N = int(input())
Color = ['Gray','Brown','Green','LBlue','Blue','Yellow','Orange','Red']
Rate = list(map(int,input().split()))
D = dict(zip(Color,[0]*8))
pro = 0

for r in Rate:
  if 1 <= r <= 399: D['Gray'] += 1
  elif 400 <= r <= 799: D['Brown'] += 1
  elif 800 <= r <= 1199: D['Green'] += 1
  elif 1200 <= r <= 1599: D['LBlue'] += 1
  elif 1600 <= r <= 1999: D['Blue'] += 1
  elif 2000 <= r <= 2399: D['Yellow'] += 1
  elif 2400 <= r <= 2799: D['Orange'] += 1
  elif 2800 <= r <= 3199: D['Red'] += 1
  else: pro += 1
    
used = sum(i > 0 for i in D.values())
unused = (8-used)

if pro > 0 and used > 0:
  print(used, used+min(unused,pro))
elif pro > 0 and used == 0:
  print(1, pro)
else:
  print(used, used)