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

A = sum(D)**2 - sum([d*d for d in D])

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

A = sum(D)**2 - sum([d*d for d in D])

print(A//2)