n = int(input())
a = list(map(int, input().split()))
con = 0
var = 0
count = [1, 1, 1, 1, 1, 1, 1, 1]

for i in a:
    if(i < 400):
        con += count[0]
        count[0] = 0
    elif(i < 800):
        con += count[1]
        count[1] = 0
    elif(i < 1200):
        con += count[2]
        count[2] = 0
    elif(i < 1600):
        con += count[3]
        count[3] = 0
    elif(i < 2000):
        con += count[4]
        count[4] = 0
    elif(i < 2400):
        con += count[5]
        count[5] = 0
    elif(i < 2800):
        con += count[6]
        count[6] = 0
    elif(i < 3200):
        con += count[7]
        count[7] = 0
    else:
        var += 1

print(con, con+var)

