n = int(input())
rate_list = list(map(int,input().split()))
colors = [0 for _ in range(8)]
pros = 0

for i in range(n):
    rate_color = rate_list[i]//400%9
    if rate_color < 8:
        colors[rate_color] = 1
    else:
        pros += 1
total_color = sum(colors)
print('{} {}' .format(total_color,(total_color+pros)%9))