from collections import Counter
input()
A = list(map(int, input().split()))
C = Counter([sum(a >= r for r in [400,800,1200,1600,2000,2400,2800,3200]) for a in A])
c8 = C[8] if 8 in C else 0
a1 = len(C) - (1 if c8 else 0)
a2 = min(8, a1+c8)
print(a1, a2)