N = int(input())
List = input().split()
counter = [0 for _ in range(8)]
prime = 0
for item in List:
  if int(item) >=3200:
    prime +=1
  else:
    num = int(item)//400
    counter[num] += 1

minimum = 8 - counter.count(0)
maximum = minimum + prime
print(minimum, maximum)
