n = int(input())
l = list(map(int,input().split()))
color = [0]*9
def col(x):
  if 1<=x<=399:
    return 0
  elif 400<=x<=799:
    return 1
  elif 800<=x<=1199:
    return 2
  elif 1200<=x<=1599:
    return 3
  elif 1600<=x<=1999:
    return 4
  elif 2000<=x<=2399:
    return 5
  elif 2400<=x<=2799:
    return 6
  elif 2800<=x<=3199:
    return 7
  else:
    return 8
  
for i in l:
  a = col(i)
  color[a] += 1
color2 = [i for i in color if i!=0]
if color[8]==0:
  print(len(color2),len(color2))
else:
  print(max(len(color2)-1,1),min(len(color2)-1+color[8],8))
 