N = input()
a = [int(i) for i in input().split()]
scores = [0,0,0,0,0,0,0,0]
score8 = 0
for i in a:
    checknum = int(i/400)
    if checknum > 7:
        score8 += 1
    else:
        scores[checknum] = 1
score1to7 = sum(scores)
saidai = min(score1to7 + score8, 8)
saisho = min(max(score1to7, score8), 8)
print(str(saisho) + " " + str(saidai))