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

iro = []
for i in range(N):
    iro.append(A[i] // 399)

if 8 in iro:
    print(len(set(iro)) - 1, end=" ")
else:
    print(len(set(iro)), end=" ")

if 8 in iro:
    if len(iro) >= 8:
        print("8")
    else:
        print(len(iro))
else:
    print(len(set(iro)))