from collections import Counter



N, *D = list(map(int, open(0).read().split()))



print((len(Counter(D).most_common())))
N, *D = list(map(int, open(0).read().split()))



print((len(set(D))))
from collections import Counter

N, *D = list(map(int, open(0).read().split()))
print((len(Counter(D).most_common())))

N, *D = list(map(int, open(0).read().split()))
print((len(set(D))))

-from collections import Counter - -print((len(Counter(D).most_common()))) +print((len(set(D))))