n = int(input())
A = list(map(int, input().split()))
B = set()
C = []
for i in A:
    if 1<= i <= 399:
        B.add("grey")
    elif 400 <= i <= 799:
        B.add("brown")
    elif 800 <= i <= 1199:
        B.add("green")
    elif 1200 <= i <= 1599:
        B.add("sky")
    elif 1600 <= i <= 1999:
        B.add("blue")
    elif 2000 <= i <= 2399:
        B.add("yellow")
    elif 2400 <= i <= 2700:
        B.add("orange")
    elif 2800 <= i <= 3199:
        B.add("red")
    else:
        C.append("X")

if C:
    S = len(B)
    if S == 0:
        S = 1
    T = len(B) + len (C)
    print(str(S) + " " + str(T))
else:
    print(str(len(B)) + " " + str(len(B)))