#C Colorful
import numpy as np
a = int(input())
x = list(map(int,input().split()))
x.sort()
x = x[::-1]
n =0
k = [0,0,0,0,0,0,0,0]
for i in x:
    if i < 400:
        k[0] = 1
    elif i < 800:
        k[1] = 1
    elif i < 1200:
        k[2] = 1
    elif i < 1600:
        k[3] = 1
    elif i < 2000:
        k[4] = 1
    elif i < 2400:
        k[5] = 1
    elif i < 2800:
        k[6] = 1
    elif i < 3200:
        k[7] = 1
    else:
        n +=1
c = np.array(k)
s = ss= c.sum()

if s < 8:
    ss = ss + n
    if ss > 8:
        ss = 8
print (s,ss)