N = int(input())
a = list(map(int, input().split()))

color = []
another = 0
for i in range(N):
  if a[i] <= 399: color.append("gray")
  elif a[i] <= 799: color.append("brown")
  elif a[i] <= 1199: color.append("green")
  elif a[i] <= 1599: color.append("wblue")
  elif a[i] <= 1999: color.append("blue")
  elif a[i] <= 2399: color.append("yellow")
  elif a[i] <= 2799: color.append("orange")
  elif a[i] <= 3199: color.append("red")
  else: another +=1
color = list(set(color))
print(len(color), len(color) + another)