N = int(input())
A = list(map(int, input().split()))
A.sort()
dic = {1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0}
count = 0
for a in A:
  if a < 400:
    dic[1] += 1
  elif a < 800:
    dic[2] += 1
  elif a < 1200:
    dic[3] += 1
  elif a < 1600:
    dic[4] += 1
  elif a < 2000:
    dic[5] += 1
  elif a < 2400:
    dic[6] += 1
  elif a < 2800:
    dic[7] += 1
  elif a < 3200:
    dic[8] += 1
  else:
    count += 1
total = 0
for i in range(1, 9):
  if dic[i] != 0:
    total += 1
print(max(total, count), total + count)
