function main()
  
  N = parse(Int,readline())
  a = map(x -> parse(Int,x), split(readline()))
  
  color = zeros(Int,8)
  
  for i in 1:N
    
    if 1<=a[i]<=399
      color[1] += 1
    elseif 400<=a[i]<=799
      color[2] += 1
    elseif 800<=a[i]<=1199
      color[3] += 1
    elseif 1200<=a[i]<=1599
      color[4] += 1
    elseif 1600<=a[i]<=1999
      color[5] += 1
    elseif 2000<=a[i]<=2399
      color[6] += 1
    elseif 2400<=a[i]<=2799
      color[7] += 1
    elseif 2800<=a[i]<=3199
      color[8] += 1
    end
    
  end
  
  count = 0
  count0 = 0
  
  for i in 1:8
    
    count += color[i]
    
  end
  
  count = N - count
  
  if count != 0
    count0 = 1
  else
    count0 = 0
  end
  
  count2 = 0
  
  for i in 1:8
    
    if color[i] != 0
      count2 += 1
    end
    
  end
  
  println(string(count0 + count2)*" "*string(count + count2))
  
end

main()