#ABC064-C
n = int(input())
a = list(map(int,input().split()))

color = [False for _ in range(8)]
red = 0
for i in range(n):
    if 1<=a[i]<= 399:
        color[0] = True
        
    elif 400<=a[i]<=799:
        color[1] = True
        
    elif 800<=a[i]<=1199:
        color[2] = True
        
    elif 1200<=a[i]<=1599:
        color[3] = True
        
    elif 1600<=a[i]<=1999:
        color[4] = True
        
    elif 2000<=a[i]<=2399:
        color[5] = True
        
    elif 2400<=a[i]<=2799:
        color[6] = True
        
    elif 2800<=a[i]<=3199:
        color[7] = True
        
    elif a[i]>=3200:
        red += 1    
        
        
c = color.count(True)

if red + c <= 8:
    ma = red + c
else:
    ma = 8
        
if c == 0:
    mi = 1
else:
    mi = c
        
print(mi,ma)
        
        
    