#1問目
N = int(input())
A = list(map(int, input().split()))
color = [0,0,0,0,0,0,0,0]
overColor = 0
Min = 0
Max = 0

for i in range(N):
    if 1 <= A[i] <= 399:
        color[0] += 1
    elif 400 <= A[i] <= 799:
        color[1] += 1
    elif 800 <= A[i] <= 1199:
        color[2] += 1
    elif 1200 <= A[i] <= 1599:
        color[3] += 1
    elif 1600 <= A[i] <= 1999:
        color[4] += 1
    elif 2000 <= A[i] <= 2399:
        color[5] += 1
    elif 2400 <= A[i] <= 2799:
        color[6] += 1
    elif 2800 <= A[i] <= 3199:
        color[7] += 1
    else:
        overColor += 1

count = 0
for i in range(8):
    if(color[i] > 0):
        count+=1

if(overColor == 0):
    print(str(count) + " " + str(count))
else:
    if(count >= 6):
        if(overColor >= 2):
            print(str(count) + " 8")
        else:
            print(str(count) + " " + str(count + overColor))
    elif(count == 0):
        if(overColor >= 8):
            print("1 8")
        else:
            print("1 " + str(overColor))
    else:
        if(count + overColor >= 8):
            print(str(count) + " 8")
        else:
            print(str(count) + " " + str(count + overColor))