import collections

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

cnt = collections.defaultdict(lambda: 0)
for i in range(N):
    if a[i] < 399:
        cnt['gray'] += 1
    elif a[i] < 799:
        cnt['brown'] += 1
    elif a[i] < 1199:
        cnt['green'] += 1
    elif a[i] < 1599:
        cnt['sky'] += 1
    elif a[i] < 1999:
        cnt['blue'] +=1
    elif a[i] < 2399:
        cnt['yellow'] += 1
    elif a[i] < 2799:
        cnt['orange'] +=1
    elif a[i] < 3199:
        cnt['red'] += 1
    else:
        cnt['any'] += 1

key = cnt.keys()
if 'any' in key:
    color_type = len(key) - 1
else:
    color_type = len(key)
    
color_sum = 0

for each in key:
    if each != 'any':
        color_sum += cnt[each]
        
any_sum = N - color_sum

if color_type == 8:
    print(8,8)
else:
    if any_sum == 0:
        print(color_type, color_type)
    else:
        print(color_type, min(8, max(N, color_type + any_sum)))