# - coding: utf-8 -*-

# 色を返却
def what_color(num):
    if num < 400: #灰色
        return 0
    elif num < 800: #茶色
        return 1
    elif num <1200 : #緑
        return 2
    elif num < 1600: #水色
        return 3
    elif num < 2000: #青
        return 4
    elif num < 2400: #黄色
        return 5
    elif num < 2800: #橙色
        return 6
    elif num < 3200: #赤色
        return 7
    else:
        return 8

n = raw_input()
a = map(int, raw_input().split())

colors = [0, 0, 0, 0, 0, 0, 0, 0]
god = 0
for rate in a:
    color = what_color(rate)
    if color == 8:
        god = god+1
    else:
        colors[color] = 1

sum_colors = sum(colors)

saidai = sum_colors + god
saisyo = sum_colors
if saisyo == 0:
    saisyo = 1

print '{0} {1}'.format(saisyo, saidai)
