n = int(input())
A = list(map(int, input().split()))
c = []
other = 0
for a in A:
    if a< 400:c.append(1)
    elif a < 800: c.append(2)
    elif a < 1200: c.append(3)
    elif a < 1600: c.append(4)
    elif a < 2400: c.append(5)
    elif a < 2800: c.append(6)
    elif a < 3200: c.append(7)
    else: other+=1
c = set(c)
if c: print(len(c), len(c)+other)
else: print(1, other)