# ABC 064 C
N = int(input())
from collections import Counter
def get_color(a):
    if a<400:
        return 1
    elif a<800:
        return 2
    elif a<1200:
        return 3
    elif a<1600:
        return 4
    elif a<2000:
        return 5
    elif a<2400:
        return 6
    elif a<2800:
        return 7
    elif a<3200:
        return 8
    else:
        return 999

A = [get_color(int(j)) for j in input().split()]
C_A = Counter(A)

if 999 in set(A):
    print(len(set(A))-1,min(len(set(A))-1+C_A[999],8))
else:
    print(min(len(set(A)),8),min(len(set(A)),8))