n = int(input())
a = list(map(int,input().split()))
d = {'8':0}
for i in a:
  if 1 <= i <= 399:
    if '0' in d:
      d['0'] += 1
    else:
      d['0'] = 1
  elif 400 <= i <= 799:
    if '1' in d:
      d['1'] += 1
    else:
      d['1'] = 1
  elif 800 <= i <= 1199:
    if '2' in d:
      d['2'] += 1
    else:
      d['2'] = 1
  elif 1200 <= i <= 1599:
    if '3' in d:
      d['3'] += 1
    else:
      d['3'] = 1
  elif 1600 <= i <= 1999:
    if '4' in d:
      d['4'] += 1
    else:
      d['4'] = 1
  elif 2000 <= i <= 2399:
    if '5' in d:
      d['5'] += 1
    else:
      d['5'] = 1
  elif 2400 <= i <= 2799:
    if '6' in d:
      d['6'] += 1
    else:
      d['6'] = 1
  elif 2800 <= i <= 3199:
    if '7' in d:
      d['7'] += 1
    else:
      d['7'] = 1
  else:
    if '8' in d:
      d['8'] += 1
    else:
      d['8'] = 1
if d['8'] == 0 :
  print(len(d)-1,len(d)-1)
else:
  print(len(d)-1,min(7,len(d)+d['8'] -1))