Set = {int(x) for x in input().split()}

print((len(Set)))
print((len(set(input().split()))))
Set = {int(x) for x in input().split()}
print((len(Set)))

print((len(set(input().split()))))

-Set = {int(x) for x in input().split()} -print((len(Set))) +print((len(set(input().split()))))