from collections import Counter
n = int(input())
x = list(map(int,input().strip().split()))

rate = []
over = 0
for i in range(n):
  if x[i]//400 >=8:
    over += 1
  else:
    rate.append(x[i]//400)
result = ""
elem = len(set(rate))
if elem >= 8:
  result = "8 8"
elif elem + over >=8:
  result = str(elem) +" " +"8"
else:
  result = str(elem)+" "+ str(elem + over)
print(result)