b = {}
b['gray'] = 0
b['brown'] = 0
b['green'] = 0
b['cyan'] = 0
b['blue'] = 0
b['yellow'] = 0
b['orange'] = 0
b['red'] = 0
b['other'] = 0

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

for ai in a:
    if ai < 400:
        b['gray'] += 1
    elif ai < 800:
        b['brown'] += 1
    elif ai < 1200:
        b['green'] += 1
    elif ai < 1600:
        b['cyan'] += 1
    elif ai < 2000:
        b['blue'] += 1
    elif ai < 2400:
        b['yellow'] += 1
    elif ai < 2800:
        b['orange'] += 1
    elif ai < 3200:
        b['red'] += 1
    else:
        b['other'] += 1

ans = 0
for k, v in b.items():
    if k != 'other' and v > 0:
        ans += 1

print(ans, ans + b['other'])
