from sys import stdin

n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
lin = [0]*9

for i in li:
    if 1<= i < 400:
        lin[0] = 1
    elif 400<= i < 800:
        lin[1] = 1
    elif 800<= i < 1200:
        lin[2] = 1
    elif 1200<= i < 1600:
        lin[3] = 1
    elif 1600<= i < 2000:
        lin[4] = 1
    elif 2000<= i < 2400:
        lin[5] = 1
    elif 2400<= i < 2800:
        lin[6] = 1
    elif 2800<= i < 3200:
        lin[7] = 1
    else:
        lin[8] += 1
mi = lin[:-1].count(1)
if lin[8] > 8-mi:
    ma = 8
else:
    ma = mi+lin[-1]

print(mi,ma)