from itertools import permutations
n = int(input())
d = [int(i) for i in input().split()]
t = sum([i[0] * i[1] for i in permutations(d, 2)]) // 2
print(t) from itertools import permutations n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i d = [int(i) for i in input().split()] d [int(i) for i in input().split()] i[0] * i[1] for i in permutations(d, 2) for i in permutations(d, 2) i permutations(d, 2) permutations d 2 for i in permutations(d, 2) i[0] * i[1] i[0] i 0 i[1] i 1 t = sum([i[0] * i[1] for i in permutations(d, 2)]) // 2 t sum([i[0] * i[1] for i in permutations(d, 2)]) // 2 sum([i[0] * i[1] for i in permutations(d, 2)]) sum [i[0] * i[1] for i in permutations(d, 2)] 2 print(t) print t n = int(input()) int(input()) n d = [int(i) for i in input().split()] [int(i) for i in input().split()] d t = sum([i[0] * i[1] for i in permutations(d, 2)]) // 2 sum([i[0] * i[1] for i in permutations(d, 2)]) // 2 t
from itertools import permutations
n = int(input())
d = [int(i) for i in input().split()]
t = sum([i[0] * i[1] for i in permutations(d, 2)]) // 2
print(t)