local n = io.read("*n") local a = {} for i = 1, n * 2 do a[i] = io.read("*n") end table.sort(a) local ret = 0 for i = 1, n * 2, 2 do ret = ret + a[i] * a[i + 1] end ret = tostring(1LL * ret):gsub("LL", "") print(ret)