input()
*l,=map(int,input().split())
ans=0
for i in l:
    for j in l:
        ans+=i*j
print((ans-sum([pow(x,2) for x in l]))//2) input() input *l,=map(int,input().split()) *l l map(int,input().split()) map int input().split() ().split () input split ans=0 ans 0 for i in l:
    for j in l:
        ans+=i*j i l for j in l:
        ans+=i*j j l ans+=i*j ans i*j i j pow(x,2) for x in l for x in l x l for x in l pow(x,2) pow x 2 print((ans-sum([pow(x,2) for x in l]))//2) print (ans-sum([pow(x,2) for x in l]))//2 ans-sum([pow(x,2) for x in l]) ans sum([pow(x,2) for x in l]) sum [pow(x,2) for x in l] 2 ans=0 0 ans ans+=i*j i*j ans
input()
*l,=map(int,input().split())
ans=0
for i in l:
    for j in l:
        ans+=i*j
print((ans-sum([pow(x,2) for x in l]))//2)