N = int(input())
a = list(map(int, input().split()))
result = [0] * 8
overColor = 0
Min = 0
Max = 0
for i in a:
    if(1 <= i <= 399):
        result[0] += 1
    elif(400 <= i <= 799):
        result[1] += 1
    elif(800 <= i <= 1199):
        result[2] += 1
    elif(1200 <= i <= 1599):
        result[3] += 1
    elif(1600 <= i <= 1999):
        result[4] += 1
    elif(2000 <= i <= 2399):
        result[5] += 1
    elif(2400 <= i <= 2799):
        result[6] += 1
    elif(2800 <= i <= 3199):
        result[7] += 1
    else:
        overColor += 1

for i in result:
    if i != 0:
        Min += 1
        Max += 1

Max += overColor

print(Min, Max)