
N = int(input())
A = list(map(int,input().split()))
colors = [0] * 8
for a in A:
  index = min(a // 400,8)-1
  colors[index] += 1
min_color = sum([1 for c in colors[:-1] if c != 0])
max_color = min(min_color+colors[-1],8)
print(min_color,max(min_color,max_color))
 