func main()
	var n: int :: cui@inputInt()
	var a: []int :: #[2 * n]int
	for i(0, 2 * n - 1)
		do a[i] :: cui@inputInt()
	end for
	do a.sort()
	
	var ans: int :: 0
	for i(0, n - 1)
		do ans :+ a[2 * i] * a[2 * i + 1]
	end for
	do cui@print("\{ans}\n")
end func