import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

n = int(input())
a = list(map(int,input().split()))
d = [0] *8
p = 0
for i in a:
    if i>=1 and i<400:
        d[0] += 1
    elif i >= 400 and i<800:
        d[1] +=1
    elif i >=800 and i<1200:
        d[2] += 1
    elif i>=1200 and i<1600:
        d[3] += 1
    elif i>=1600 and i<2000:
        d[4] += 1
    elif i>=2000 and i<2400:
        d[5] += 1
    elif i>=2400 and i<2800:
        d[6] += 1
    elif i>=2800 and i<3200:
        d[7] += 1
    else:
        p += 1
cnt = 0
for i in range(len(d)):
    if d[i]>0:
        cnt+=1
print(cnt,cnt+p)