

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
##############################

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

ans_min = 0
ans_max = 0
colors = [0] * 8

def get_colors(num):
    if num <= 399:
        return 0
    elif num <= 799:
        return 1
    elif num <= 1199:
        return 2
    elif num <= 1599:
        return 3
    elif num <= 1999:
        return 4
    elif num <= 2399:
        return 5
    elif num <= 2799:
        return 6
    elif num <= 3199:
        return 7
    else:
        return -1

all = 0
for i in range(N):
    color = get_colors(A[i])
    if color == -1:
        all += 1
    else:
        colors[color] += 1

x = colors.count(0)
if x == 8:
    ans_min = 1
    all -= 1
else:
    ans_min = 8 - x

ans_max = min(8, ans_min + all)

print(ans_min, ans_max)