n = int(input())
A = list(map(int, input().split()))

color = [0] * 8
cnt3200 = 0
for a in A:
  if a < 400:
    color[0] = 1
  elif a < 800:
    color[1] = 1
  elif a < 1200:
    color[2] = 1
  elif a < 1600:
    color[3] = 1
  elif a < 2000:
    color[4] = 1
  elif a < 2400:
    color[5] = 1
  elif a < 2800:
    color[6] = 1
  elif a < 3200:
    color[7] = 1
  else:
    cnt3200 += 1

cnt_min = color.count(1)
if cnt_min == 0:
  cnt_min = 1
  cnt_max = min(cnt3200, 8)
else:
  cnt_max = min(cnt_min + cnt3200, 8)

print(cnt_min, cnt_max)