n = int(input())
a = list(map(int, input().split()))

def color(point):
  if point < 3200:
    return point // 400
  else:
    return 8

vals = {}
for i in a:
  cl = color(i)
  vals.setdefault(cl, 0)
  vals[cl] += 1

# print(vals)
  
if 8 not in vals.keys():
  print(len(vals), len(vals))
else:
  if len(vals) == 1:
    print(1, max(2, vals[8]))
  else:
    print(len(vals) - 1, min(8, len(vals) + 1))