n = int(input())
a = list(map(int,input().split()))
a = sorted([i//400 for i in a])
min = 0
max = 0
flag = -1
for i in range(n):
  if a[i] >= 8:
    max += 1
  elif flag != a[i]:
    min += 1
    max += 1
  flag = a[i]
print(min,max)