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

chofuku = 0
for x in d:
    for y in d:
        chofuku += x*y
chofuku //= 2

nochofuku = 0
for x in d:
    nochofuku += x*x
nochofuku //= 2

print(chofuku-nochofuku) 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 chofuku = 0 chofuku 0 for x in d:
    for y in d:
        chofuku += x*y x d for y in d:
        chofuku += x*y y d chofuku += x*y chofuku x*y x y chofuku //= 2 chofuku 2 nochofuku = 0 nochofuku 0 for x in d:
    nochofuku += x*x x d nochofuku += x*x nochofuku x*x x x nochofuku //= 2 nochofuku 2 print(chofuku-nochofuku) print chofuku-nochofuku chofuku nochofuku nochofuku = 0 0 nochofuku nochofuku //= 2 2 nochofuku chofuku = 0 0 chofuku chofuku += x*y x*y chofuku chofuku //= 2 2 chofuku d = list(map(int,input().split())) list(map(int,input().split())) d n = int(input()) int(input()) n nochofuku += x*x x*x nochofuku
n = int(input())
d = list(map(int,input().split()))

chofuku = 0
for x in d:
    for y in d:
        chofuku += x*y
chofuku //= 2

nochofuku = 0
for x in d:
    nochofuku += x*x
nochofuku //= 2

print(chofuku-nochofuku)
