import sys

n = int(sys.stdin.readline())
a_list = [int(x) for x in sys.stdin.readline().split()]

color_list = [0] * 8
rainbow = 0
for i in a_list:
    if 1 <= i <= 399:
        color_list[0] += 1
    elif 400 <= i <= 799:
        color_list[1] += 1
    elif 800 <= i <= 1199:
        color_list[2] += 1
    elif 1200 <= i <= 1599:
        color_list[3] += 1
    elif 1600 <= i <= 1999:
        color_list[4] += 1
    elif 2000 <= i <= 2399:
        color_list[5] += 1
    elif 2400 <= i <= 2799:
        color_list[6] += 1
    elif 2800 <= i <= 3199:
        color_list[7] += 1
    else:
        rainbow += 1
confirm = 8 - color_list.count(0)
if confirm == 0:
    print(1, min(8, rainbow))
else:
    print(confirm, min(confirm + rainbow, 8))
