n = int(input())

def convert_color(rate):
    if rate >= 1 and rate <= 399:
        return 0
    if rate >= 400 and rate <= 799:
        return 1
    if rate >= 800 and rate <= 1199:
        return 2
    if rate >= 1200 and rate <= 1599:
        return 3
    if rate >= 1600 and rate <= 1999:
        return 4
    if rate >= 2000 and rate <= 2399:
        return 5
    if rate >= 2400 and rate <= 2799:
        return 6
    if rate >= 2800 and rate <= 3199:
        return 7
    if rate >= 3200:
        return 100


a_L = list(map(int,input().split()))
a_L = sorted(a_L)

flag = False
ans = []

ov = 0
for i in a_L:
    if i>= 3200:
        ov += 1
        continue
    ans.append(convert_color(i))

num = len(set(ans))
max_num =  num
if ov != 0:
    for _ in range(ov):
        if max_num <= 7:
            max_num += 1

min_num = num
print(min_num,max_num)

