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

S = []
for i in range(N):
    for t in range(i):
        if i != t:
            S.append(d[i]*d[t])
print(sum(S)) 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 = [] S [] for i in range(N):
    for t in range(i):
        if i != t:
            S.append(d[i]*d[t]) i range(N) range N for t in range(i):
        if i != t:
            S.append(d[i]*d[t]) t range(i) range i if i != t:
            S.append(d[i]*d[t]) i != t i t S.append(d[i]*d[t]) S.append S append d[i]*d[t] d[i] d i d[t] d t print(sum(S)) print sum(S) sum S S = [] [] S 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 = []
for i in range(N):
    for t in range(i):
        if i != t:
            S.append(d[i]*d[t])
print(sum(S))