import numpy as np



n = int(eval(input()))



v_list = np.array(list(map(int,input().split())))

c_list = np.array(list(map(int,input().split())))

e_list = list(v_list - c_list)



ans = 0



for i in range(n):

    if e_list[i] > 0:

        ans += e_list[i]



print(ans)

n = int(eval(input()))



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

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



e_list = [v-c if (v-c > 0) else 0 for v,c in zip(v_list, c_list)]



print((sum(e_list)))

import numpy as np

n = int(eval(input()))
v_list = np.array(list(map(int, input().split())))
c_list = np.array(list(map(int, input().split())))
e_list = list(v_list - c_list)
ans = 0
for i in range(n):
    if e_list[i] > 0:
        ans += e_list[i]
print(ans)

n = int(eval(input()))
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
e_list = [v - c if (v - c > 0) else 0 for v, c in zip(v_list, c_list)]
print((sum(e_list)))

-import numpy as np - -v_list = np.array(list(map(int, input().split()))) -c_list = np.array(list(map(int, input().split()))) -e_list = list(v_list - c_list) -ans = 0 -for i in range(n): -    if e_list[i] > 0: -        ans += e_list[i] -print(ans) +v_list = list(map(int, input().split())) +c_list = list(map(int, input().split())) +e_list = [v - c if (v - c > 0) else 0 for v, c in zip(v_list, c_list)] +print((sum(e_list)))