N = int(input())
array = [int(i) for i in input().split()]
ans_array = [0]*8
upper_num = 0

for i in array:
  if 1 <= i <= 399:
    ans_array[0] =  1
  elif 400 <= i <= 799:
    ans_array[1] =  1
  elif 800 <= i <= 1199:
    ans_array[2] =  1
  elif 1200 <= i <= 1599:
    ans_array[3] =  1
  elif 1600 <= i <= 1999:
    ans_array[4] =  1
  elif 2000 <= i <= 2399:
    ans_array[5] =  1
  elif 2400 <= i <= 2799:
    ans_array[6] =  1
  elif 2800 <= i <= 3199:
    ans_array[7] =  1
  else:
    upper_num += 1
    
min_num = sum(ans_array)
max_num = sum(ans_array) + upper_num

print(min_num, max_num)