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

d = {"Gray": 0, "Brown": 0, "Green": 0, "Sky": 0, "Blue": 0, "Yellow": 0, "Orange": 0, "Red": 0}
f = 0

for i in range(N):
    s = A[i]
    if s <= 399:
        d["Gray"] += 1
    elif s >= 400 and s <= 799:
        d["Brown"] += 1
    elif s >= 800 and s <= 1199:
        d["Green"] += 1
    elif s >= 1200 and s <= 1599:
        d["Sky"] += 1
    elif s >= 1600 and s <= 1999:
        d["Blue"] += 1
    elif s >= 2000 and s <= 2399:
        d["Yellow"] += 1
    elif s >= 2400 and s <= 2799:
        d["Orange"] += 1
    elif s >= 2800 and s <= 3199:
        d["Red"] += 1
    elif s >= 3200:
        f += 1

MIN = 0
for v in d.values():
    if v > 0:
        MIN += 1

MAX = MIN
if f > 0 and MIN < 8:
    MAX += f

if MAX > 8:
    MAX = 8

if MIN == 0 : MIN = 1

print(MIN, MAX)