n = int(input())
d = list(map(int,input().split()))
ml = []
for i in range(n):
  for j in range(i+1,n):
    ml.append(d[i]*d[j])
print(sum(ml)) 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 ml = [] ml [] for i in range(n):
  for j in range(i+1,n):
    ml.append(d[i]*d[j]) i range(n) range n for j in range(i+1,n):
    ml.append(d[i]*d[j]) j range(i+1,n) range i+1 i 1 n ml.append(d[i]*d[j]) ml.append ml append d[i]*d[j] d[i] d i d[j] d j print(sum(ml)) print sum(ml) sum ml n = int(input()) int(input()) n d = list(map(int,input().split())) list(map(int,input().split())) d ml = [] [] ml
n = int(input())
d = list(map(int,input().split()))
ml = []
for i in range(n):
  for j in range(i+1,n):
    ml.append(d[i]*d[j])
print(sum(ml))