n = input()
a = input()
tmp_a = a.split()
a_list = []
o_list = []
flag = 0

for i in range(int(n)):
    if int(tmp_a[i]) < 400:
        a_list.append("gray")
    elif 400 <= int(tmp_a[i]) and int(tmp_a[i]) < 800:
        a_list.append("brown")
    elif 800 <= int(tmp_a[i]) and int(tmp_a[i]) < 1200:
        a_list.append("green")
    elif 1200 <= int(tmp_a[i]) and int(tmp_a[i]) < 1600:
        a_list.append("sky")
    elif 1600 <= int(tmp_a[i]) and int(tmp_a[i]) < 2000:
        a_list.append("blue")
    elif 2000 <= int(tmp_a[i]) and int(tmp_a[i]) < 2400:
        a_list.append("yellow")
    elif 2400 <= int(tmp_a[i]) and int(tmp_a[i]) < 2800:
        a_list.append("orange")
    elif 2800 <= int(tmp_a[i]) and int(tmp_a[i]) < 3200:
        a_list.append("red")
    else:
        o_list.append("other")

n_other = len(o_list)

if len(a_list)==0:
    min_num = 1
else:
    min_num = len(set(a_list))

max_num = len(set(a_list))+n_other
if max_num > 8:
    max_num = 8

print(min_num, max_num)
