# -*- coding: utf-8 -*-
#レート 1-399：灰色 :gray
#レート 400-799：茶色 :brown
#レート 800-1199：緑色 : green
#レート 1200-1599：水色 :skyblue
#レート 1600-1999：青色 :blue
#レート 2000-2399：黄色 :yellow
#レート 2400-2799：橙色 :orange
#レート 2800-3199：赤色 :red

x = int(input())
y = input().split()

gray = 0
brown = 0
green = 0
skyblue = 0
blue = 0
yellow = 0
orange = 0
red = 0
other = 0

for i in range(x):
    z = int(y[i]) 
    if z < 400:
       gray = 1 
    elif z < 800:
        brown = 1
    elif z < 1200:
        green = 1
    elif z < 1600:
        skyblue = 1
    elif z < 2000:
        blue = 1
    elif z < 2400:
        yellow = 1
    elif z < 2800:
        orange = 1
    elif z < 3200:
        red = 1
    else:
        other = other + 1

if other >= 1:
    ans_max = gray + brown + green + skyblue + blue + yellow + orange + red + other
    ans_min = gray + brown + green + skyblue + blue + yellow + orange + red + 0
    
    print(str(ans_min) + " " + str(ans_max))

else:
    ans = gray + brown + green + skyblue + blue + yellow + orange + red + other
    
    print(str(ans) + " " + str(ans))
    
