n,m=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
x.sort(reverse=True)
y.sort(reverse=True)

ans_x=0
for i in range(n):
    ans_x+=x[i]*(n-(2*(i+1)-1))
ans_y=0
for j in range(m):
    ans_y+=y[j]*(m-(2*(j+1)-1))
print(ans_x*ans_y)

