from collections import defaultdict
N = int(input())
al = list(map(int,input().split()))

dic = defaultdict(int)
for i in al:
    if 1<= i <= 399:
        dic['gray'] += 1
    elif 400 <= i <= 799:
        dic['brown'] += 1
    elif 800 <= i <= 1199:
        dic['green'] += 1
    elif 1200 <= i <= 1599:
        dic['cyan'] += 1
    elif 1600 <= i <= 1999:
        dic['blue'] += 1
    elif 2000 <= i <= 2399:
        dic['yellow'] += 1
    elif 2400 <= i <= 2799:
        dic['orange'] += 1
    elif 2800 <= i <= 3199:
        dic['red'] += 1
    else:
        dic['black'] += 1
ansmin = len(dic.keys())
ansmax = len(dic.keys())

if len(dic.keys()) <= 7:
    if dic['black'] > 1:
        ansmax += dic['black']-1
        if ansmax > 8:
            ansmax = 8
if len(dic.keys()) >= 2:
    if dic['black'] >= 1:
        ansmin -= 1

print(ansmin,ansmax)


		