N = int(input())
A = list(map(int, input().split()))
D = {
    'gray': 0,
    'brown': 0,
    'green': 0,
    'lightblue': 0,
    'blue': 0,
    'yellow': 0,
    'orange': 0,
    'red': 0,
}
ultimate = 0

for a in A:
    if a < 400:
        D['gray'] += 1
    elif a < 800:
        D['brown'] += 1
    elif a < 1200:
        D['green'] += 1
    elif a < 1600:
        D['lightblue'] += 1
    elif a < 2000:
        D['blue'] += 1
    elif a < 2400:
        D['yellow'] += 1
    elif a < 2800:
        D['orange'] += 1
    elif a < 3200:
        D['red'] += 1
    else:
        ultimate += 1

smallest = sum(map(bool, D.values()))
biggest = smallest + ultimate
print(smallest, biggest)
