from collections import Counter
n = int(input())
x = list(map(int,input().strip().split()))

rate = []
over = 0
for i in range(n):
  if x[i]//400 >=8:
    over += 1
  else:
    rate.append(x[i]//400)
if len(set(rate)) + over >=8:
  print(str(len(set(rate))) +" 8")
  exit()
else:
  print(str(len(set(rate)))+" "+ str(len(set(rate)) + over))