N = int(input())
A = list(map(int,input().split()))
dct = {}

for i in range(9):
  dct[i] = 0
  
for i in A:
  if (i >= 1 and i < 400):
    dct[0] += 1
  elif (i >= 400 and i < 800):
    dct[1] += 1
  elif (i >= 800 and i < 1200):
    dct[2] += 1
  elif (i >= 1200 and i < 1600):
    dct[3] += 1    
  elif (i >= 1600 and i < 2000):
    dct[4] += 1    
  elif (i >= 2000 and i < 2400):
    dct[5] += 1    
  elif (i >= 2400 and i < 2800):
    dct[6] += 1    
  elif (i >= 2800 and i < 3200):
    dct[7] += 1    
  else:
    dct[8] += 1  

color1 = 0
color2 = 0
for i in dct.items():  
  if (i[0] == 8):
    color2 += i[1]
  else:
    if (i[1] > 0):
      color1 += 1
ans1 = 0
ans2 = min(8,color1+color2)
if (color1 == 0):
  ans1 = 1
else:
  ans1 = color1
print(ans1,ans2)