<gh_stars>1-10
int(input())
x = set(map(int,input().split()))
int(input())
y = set(map(int,input().split()))
z  = x.difference(y)
print(len(z))

int(input())
x = set(map(int,input().split()))
int(input())
y = set(map(int,input().split()))
z  = x.difference(y)
print(len(z))