# /usr/bin/python
# -*- coding: utf-8 -*-
import math
from collections import defaultdict



def check(a):
  if a <= 399: return 0
  elif a < 799: return 1
  elif a < 1199: return 2
  elif a < 1599: return 3
  elif a < 1999: return 4
  elif a < 2399: return 5
  elif a < 2799: return 6
  elif a < 3199: return 7
  else: return 8
  

def main():
  N = int(input())
  An = list(map(int, input().split()))
  Cn = [0]*9
  for a in An:
    Cn[check(a)] += 1
  mn = 0
  for i in range(8):
    if Cn[i]>0: mn += 1
  mx = mn
  if Cn[8] > 0:
    mx += Cn[8]
  return mn,mx


if __name__ == "__main__":
  mn,mx = main()
  print(max(1,mn),min(8,mx))