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



if a == b == c:

  	print((1))

elif a == c or a == b or b == c:

  	print((2))

else:

  	print((3))
colors = list(map(int,input().split()))

print((len(set(colors))))
a, b, c = list(map(int, input().split()))
if a == b == c:
    print((1))
elif a == c or a == b or b == c:
    print((2))
else:
    print((3))

colors = list(map(int, input().split()))
print((len(set(colors))))

-a, b, c = list(map(int, input().split())) -if a == b == c: -    print((1)) -elif a == c or a == b or b == c: -    print((2)) -else: -    print((3)) +colors = list(map(int, input().split())) +print((len(set(colors))))