from itertools import combinations
import numpy as np
N = int(input())
D = list(map(int, input().split()))
List = np.array(list(combinations(D,2)))
print(sum(np.product(List, axis = 1)))

 from itertools import combinations import numpy as np numpy 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 List = np.array(list(combinations(D,2))) List np.array(list(combinations(D,2))) np.array np array list(combinations(D,2)) list combinations(D,2) combinations D 2 print(sum(np.product(List, axis = 1))) print sum(np.product(List, axis = 1)) sum np.product(List, axis = 1) np.product np product List axis = 1 axis 1 D = list(map(int, input().split())) list(map(int, input().split())) D List = np.array(list(combinations(D,2))) np.array(list(combinations(D,2))) List N = int(input()) int(input()) N
from itertools import combinations
import numpy as np
N = int(input())
D = list(map(int, input().split()))
List = np.array(list(combinations(D,2)))
print(sum(np.product(List, axis = 1)))


