n = int(input())
num = list(map(int,input().split()))
a = 0
b = 0
for i in range(n):
    for j in range(n):
        a = a + num[i] * num[j]

for i in range(n):
    b = b + num[i] * num[i]

print((a - b) // 2) n = int(input()) n int(input()) int input() input num = list(map(int,input().split())) num list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a = 0 a 0 b = 0 b 0 for i in range(n):
    for j in range(n):
        a = a + num[i] * num[j] i range(n) range n for j in range(n):
        a = a + num[i] * num[j] j range(n) range n a = a + num[i] * num[j] a a + num[i] * num[j] a num[i] * num[j] num[i] num i num[j] num j for i in range(n):
    b = b + num[i] * num[i] i range(n) range n b = b + num[i] * num[i] b b + num[i] * num[i] b num[i] * num[i] num[i] num i num[i] num i print((a - b) // 2) print (a - b) // 2 a - b a b 2 a = 0 0 a n = int(input()) int(input()) n b = b + num[i] * num[i] b + num[i] * num[i] b b = 0 0 b num = list(map(int,input().split())) list(map(int,input().split())) num a = a + num[i] * num[j] a + num[i] * num[j] a
n = int(input())
num = list(map(int,input().split()))
a = 0
b = 0
for i in range(n):
    for j in range(n):
        a = a + num[i] * num[j]

for i in range(n):
    b = b + num[i] * num[i]

print((a - b) // 2)
