N = int(input())
A = list(map(int, input().split()))
p = sum(A)
q = sum([a * a for a in A])
print((p*p-q)//2) 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 p = sum(A) p sum(A) sum A a * a for a in A for a in A a A for a in A a * a a a q = sum([a * a for a in A]) q sum([a * a for a in A]) sum [a * a for a in A] print((p*p-q)//2) print (p*p-q)//2 p*p-q p*p p p q 2 A = list(map(int, input().split())) list(map(int, input().split())) A q = sum([a * a for a in A]) sum([a * a for a in A]) q N = int(input()) int(input()) N p = sum(A) sum(A) p
N = int(input())
A = list(map(int, input().split()))
p = sum(A)
q = sum([a * a for a in A])
print((p*p-q)//2)