n = int(input())
d = list(map(int, input().split()))
print(sum(d[i] * d[j] for i in range(n) for j in range(i+1, n))) 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 print(sum(d[i] * d[j] for i in range(n) for j in range(i+1, n))) print sum(d[i] * d[j] for i in range(n) for j in range(i+1, n)) sum d[i] * d[j] d[i] d i d[j] d j d = list(map(int, input().split())) list(map(int, input().split())) d n = int(input()) int(input()) n
n = int(input())
d = list(map(int, input().split()))
print(sum(d[i] * d[j] for i in range(n) for j in range(i+1, n)))