N,*D = map(int,open(0).read().split())
import itertools
print(sum(a * b for a,b in itertools.combinations(D,2))) N,*D = map(int,open(0).read().split()) N map(int,open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split *D D import itertools itertools print(sum(a * b for a,b in itertools.combinations(D,2))) print sum(a * b for a,b in itertools.combinations(D,2)) sum a * b a b N,*D = map(int,open(0).read().split()) map(int,open(0).read().split()) N
N,*D = map(int,open(0).read().split())
import itertools
print(sum(a * b for a,b in itertools.combinations(D,2)))