N = int(input())
List = list(map(int,input().split()))
color = [0,0,0,0,0,0,0,0,0]

for i in range(N):
  if List[i] < 400:
    color[0] += 1
  elif 400<= List[i] < 800:
    color[1] += 1
  elif 800<= List[i] < 1200:
    color[2] += 1
  elif 1200<= List[i] < 1600:
    color[3] += 1
  elif 1600<= List[i] < 2000:
    color[4] += 1
  elif 2000<= List[i] < 2400:
    color[5] += 1
  elif 2400<= List[i] < 2800:
    color[6] += 1
  elif 2800<= List[i] < 3200:
    color[7] += 1
  else:
    color[8] += 1
#print(color)
count = 0
for i in range(8):
  if color[i] != 0:
    count += 1
    
if count != 0:
  if color[8] == 0:
    print(str(count) + " " + str(count))
  else:
    if 8 - count <= color[8]:
      print(str(count) + " " + str(8))
    else:
      print(str(count) + " " + str(count+color[8]))
else:
  if color[8] <= 8:
    print(str(1) + " " + str(color[8]))
  else:
    print(str(1) + " " + str(8))