from collections import defaultdict as dd
N = int(input())
a = list(map(int, input().split()))
D = dd(int)
for i in a:
  if i >=3200:
    D[8] += 1
  else:
    D[i // 400] += 1
l = len(D.keys())
if D[8] > 0:
  print (l - 1, l + D[8] - 1)
else:
  print (l, l)
