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

colors = [0]*8
higher = 0
for a in A:
    if a <=399:
        colors[0] = 1
    elif a<= 799:
        colors[1] =1
    elif a<= 1199:
        colors[2] =1
    elif a<= 1599:
        colors[3] =1
    elif a<= 1999:
        colors[4] =1
    elif a<= 2399:
        colors[5] =1
    elif a<= 2799:
        colors[6] =1
    elif a<= 3199:
        colors[7] =1
    else:
        higher +=1
print(sum(colors),sum(colors)+higher)
