p [*$<][1].split.map(&:to_i).sort.each_slice(2).sum{_1*_2}