n=int(input())
d=list(map(int,input().split()))
d2=[m**2 for m in d]
print((sum(d)**2-sum(d2))//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 m**2 for m in d for m in d m d for m in d m**2 m 2 d2=[m**2 for m in d] d2 [m**2 for m in d] print((sum(d)**2-sum(d2))//2) print (sum(d)**2-sum(d2))//2 sum(d)**2-sum(d2) sum(d)**2 sum(d) sum d 2 sum(d2) sum d2 2 n=int(input()) int(input()) n d=list(map(int,input().split())) list(map(int,input().split())) d d2=[m**2 for m in d] [m**2 for m in d] d2
n=int(input())
d=list(map(int,input().split()))
d2=[m**2 for m in d]
print((sum(d)**2-sum(d2))//2)