N = int(input())
a = list(map(int, input().split()))

rainbow = 0
color = [0 for i in range(8)]

for i in range(N):
    if a[i] <= 399:
        color[0] = 1
    elif a[i] <= 799:
        color[1] = 1
    elif a[i] <= 1199:
        color[2] = 1
    elif a[i] <= 1599:
        color[3] = 1
    elif a[i] <= 1999:
        color[4] = 1
    elif a[i] <= 2399:
        color[5] = 1
    elif a[i] <= 2799:
        color[6] = 1
    elif a[i] <= 3199:
        color[7] = 1
    else:
        rainbow += 1
        
ans = 0
for i in range(len(color)):
    if color[i] == 1:
        ans += 1

print(ans ,min(ans+rainbow, 8))