'''
    Rating 1-399 : gray
    Rating 400-799 : brown
    Rating 800-1199 : green
    Rating 1200-1599 : cyan
    Rating 1600-1999 : blue
    Rating 2000-2399 : yellow
    Rating 2400-2799 : orange
    Rating 2800-3199 : red
'''
b = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
u = [0] * 8
import sys
n = map(int, sys.stdin.readline().split())
a = map(int, sys.stdin.readline().split())
res = 1
target = 0
for c in a:
  for i in range (len(b) - 1):
    if b[i] <= c < b[i+1]:
      u[i] = 1
  if c >= 3200:
    target += 1
print max(1, sum(u)), sum(u) + target 



