n = int(input())
d = list(map(int,input().split()))

S = sum(d)
T = sum(x*x for x in d)

print((S*S-T)//2) n = int(input()) n int(input()) int input() input d = list(map(int,input().split())) d list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split S = sum(d) S sum(d) sum d T = sum(x*x for x in d) T sum(x*x for x in d) sum x*x x x print((S*S-T)//2) print (S*S-T)//2 S*S-T S*S S S T 2 S = sum(d) sum(d) S T = sum(x*x for x in d) sum(x*x for x in d) T d = list(map(int,input().split())) list(map(int,input().split())) d n = int(input()) int(input()) n
n = int(input())
d = list(map(int,input().split()))

S = sum(d)
T = sum(x*x for x in d)

print((S*S-T)//2)