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