N = int(input())
A = [int(a) for a in input().split()]
colors = [a // 400 for a in A]
fixed_colors = len(set(c for c in colors if c <= 7))
free = sum(c >= 8 for c in colors)
print(max(fixed_colors, 1), min(fixed_colors + free, 8))