import collections



p = [int(x) for x in input().split()]

c = collections.Counter(p)

print((len(c)))

p = [int(x) for x in input().split()]

print((len(set(p))))
import collections

p = [int(x) for x in input().split()]
c = collections.Counter(p)
print((len(c)))

p = [int(x) for x in input().split()]
print((len(set(p))))

-import collections - -c = collections.Counter(p) -print((len(c))) +print((len(set(p))))