n=int(input());a=list(map(int,input().split()));print(sum([a[i]*a[j] for i in range(n) for j in range(i+1,n)])) a[i]*a[j] for i in range(n) for j in range(i+1,n) for i in range(n) for j in range(i+1,n) i range(n) range n for j in range(i+1,n) j range(i+1,n) range i+1 i 1 n for j in range(i+1,n) a[i]*a[j] a[i] a i a[j] a j n=int(input()) n int(input()) int input() input a=list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split print(sum([a[i]*a[j] for i in range(n) for j in range(i+1,n)])) print sum([a[i]*a[j] for i in range(n) for j in range(i+1,n)]) sum [a[i]*a[j] for i in range(n) for j in range(i+1,n)] n=int(input()) int(input()) n a=list(map(int,input().split())) list(map(int,input().split())) a
n=int(input());a=list(map(int,input().split()));print(sum([a[i]*a[j] for i in range(n) for j in range(i+1,n)]))