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