import numpy as np

n = int(input())
A = list(map(int, input().split()))
d = [0]*(3200+1)

for a in A:
    if a > 3200:
        a = 3200
    d[a] += 1

cnt = 0
for i in range(0, 3200, 400):
    if np.count_nonzero(d[i:i+400]) > 0:
        cnt += 1
        
if d[3200] == 0:
    print(cnt, cnt)
else:
    if cnt == 0:
        print(1, min(d[3200], 8))
    else:
        print(cnt, min(cnt+d[3200], 8))