import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

def f(rate):
    color = [399,799,1199,1599,1999,2399,2799,3199]
    for i in range(8):
        if rate <= color[i]:
            return i
    return 8
if __name__ == "__main__":
    cnt = [0,0,0,0,0,0,0,0,0]
    n = I()
    a = Intl()
    zero = 0
    ans = 0
    for i in a:
        cnt[f(i)] += 1
    for i in cnt[:-1]:
        if i == 0:
            zero += 1
        else:
            ans += 1
    print(cnt)
    print(max(1,ans),ans+min(zero,cnt[-1]))
