N = int(input())
a = [int(i) for i in input().split()]

'''
gray = 0
brown = 0
green = 0
water = 0
blue = 0
yellow = 0
orange = 0
red = 0
'''

colour = [0]*8
free = 0

for i in range(N):
    if a[i]>=1 and a[i]<=399:
        colour[0] = 1
    elif a[i]>=400 and a[i]<=799:
        colour[1] = 1
    elif a[i]>=800 and a[i]<=1199:
        colour[2] = 1
    elif a[i]>=1200 and a[i]<=1599:
        colour[3] = 1
    elif a[i]>=1600 and a[i]<=1999:
        colour[4] = 1
    elif a[i]>=2000 and a[i]<=2399:
        colour[5] = 1
    elif a[i]>=2400 and a[i]<=2799:
        colour[6] = 1
    elif a[i]>=2800 and a[i]<=3199:
        colour[7] = 1
    else:
        free += 1
        
kinds = 0
for i in range(8):
    if colour[i] == 1:
        kinds += 1

minimum = kinds

maximum = kinds+free

    
print(minimum,maximum)

