b = input().split()
c = [int(b[i]) for i in range(len(b))]

d = input().split()
e = [int(d[i]) for i in range(c[0])]

r = input().split()
f = [int(r[i]) for i in range(c[1])]

ansx = 0
for i in range(c[0]):
  tmp = i*e[i] - (c[0]-i-1)*e[i]
  ansx += tmp

ansy = 0
for i in range(c[1]):
  tmp = i*f[i] - (c[1]-i-1)*f[i]
  ansy += tmp

print(ansx * ansy)