N = int(input())
check = [False]*8
over = 0
a_s = list(map(int, input().split()))
for a in a_s:
  if 1 <=a<=399:
    check[0] = True
  elif 400<=a<=799:
    check[1]=True
  elif 800<=a<=1119:
    check[2]=True
  elif 1200<=a<=1599:
    check[3]=True
  elif 1600<=a<=1999:
    check[4]=True
  elif 2000<=a<=2399:
    check[5]=True
  elif 2400<=a<=2799:
    check[6]=True
  elif 2800<=a<=3199:
    check[7]=True
  else:
    over += 1
mn = check.count(True)
c = 0
for i in range(8):
  if c == over:
    break
  if check[i] == False:
    check[i] = True
    c += 1
if mn == 0:
  print(over, over)
else:
  print(mn,check.count(True))