n = int(input())
a = list(map(int, input().split()))
color = []
super = 0
for b in a:
    if b >= 3200:
        super += 1
    else:
        color.append(sum([b > int(x) for x in [399, 799, 1199, 1599, 1999, 2399, 2799]]))
min_color = len(set(color))
print(min_color, min(min_color + super, 8))
