n = int(eval(input()))

v = [num for num in map(int, input().split())]

c = [num for num in map(int, input().split())]



ans = 0



for i in range(n):

  val = v[i] - c[i]

  if val > 0:

    ans += val



print(ans)
n = int(eval(input()))

v = list(map(int, input().split()))

c = list(map(int, input().split()))



ans = 0

for i in range(n):

  if v[i] > c[i]:

    ans += v[i] - c[i]

print(ans)
n = int(eval(input()))
v = [num for num in map(int, input().split())]
c = [num for num in map(int, input().split())]
ans = 0
for i in range(n):
    val = v[i] - c[i]
    if val > 0:
        ans += val
print(ans)

n = int(eval(input()))
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for i in range(n):
    if v[i] > c[i]:
        ans += v[i] - c[i]
print(ans)

-v = [num for num in map(int, input().split())] -c = [num for num in map(int, input().split())] +v = list(map(int, input().split())) +c = list(map(int, input().split())) -    val = v[i] - c[i] -    if val > 0: -        ans += val +    if v[i] > c[i]: +        ans += v[i] - c[i]