def read_input():
  n = int(input())
  a = [int(item) for item in input().split()]
  return n,a

def main():
  n,a = read_input()
  l = [0 for i in range(8)]
  experts = 0
  for score in a:
    if score > 3199:
      experts += 1
    else:
      l[score//400] += 1
  minimum = 8-l.count(0)
  maximum = minimum + experts
  print(minimum, maximum)

if __name__ == '__main__':
  main()