n = int(input())
A = map(int, input().split())
rate = [0] * 9
for a in A:
    tmp = a if a < 3600 else 3599
    rate[tmp // 400] += 1
color_min = 8 - rate[:-1].count(0)
color_max = color_min + (min(rate[-1], rate[:-1].count(0)) if rate[-1] > 0 else 0)
print(color_min, color_max)