n=int(input())
a = list(map(int, input().split()))
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
h = 0
k = 0
ans = 0
j=0
for i in range(n):
    col = a[i]
    if col <= 399 and b == 0:
        b = 1
        ans += 1
    elif 400 <= col <= 799 and c == 0:
        c = 1
        ans += 1
    elif 800 <= col <= 1199 and d == 0:
        d = 1
        ans += 1
    elif 1200 <= col <= 1599 and e == 0:
        e = 1
        ans += 1
    elif 1600 <= col <= 1999 and f == 0:
        f = 1
        ans += 1
    elif 2000 <= col <= 2399 and g == 0:
        g = 1
        ans += 1
    elif 2400 <= col <= 2799 and h == 0:
        h = 1
        ans += 1
    elif 2800 <= col <= 3199 and k == 0:
        k = 1
        ans += 1
    elif 3200<=col:
        ans += 1
        j+=1
print(ans-j,"",ans)
