N = int(input())
A = list(map(int,input().split()))
t = [0 for k in range(8)]
s = 0

for x in A:
    if x < 400:
        t[0] = 1
    elif x < 800:
        t[1] = 1
    elif x < 1200:
        t[2] = 1
    elif x < 1600:
        t[3] = 1
    elif x < 2000:
        t[4] = 1
    elif x < 2400:
        t[5] = 1
    elif x < 2800:
        t[6] = 1
    elif x < 3200:
        t[7] = 1
    else:
        s += 1

print(max(1,t.count(1)),min(t.count(1)+s,8))