n = int(input())
a = [int(i) for i in input().split()]
a.sort()
chk = []
ans = [0]*2
if a[0] >= 3200:
  print('1 1')
else:
  for i in range(n):
    if a[i] < 400:
      chk.append('hai')
    elif 399 < a[i] < 800:
      chk.append('cha')
    elif 799 < a[i] < 1200:
      chk.append('mi')
    elif 1199 < a[i] < 1600:
      chk.append('miz')
    elif 1599 < a[i] < 2000:
      chk.append('ao')
    elif 1999 < a[i] < 2400:
      chk.append('ki')
    elif 2399 < a[i] < 2800:
      chk.append('dai')
    elif 2799 < a[i] < 3200:
      chk.append('aka')
    else:
      ans[1] += 1
  if 'hai' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'cha' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'mi' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'miz' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'ao' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'ki' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'aka' in chk:
    ans[0] += 1
    ans[1] += 1
  if 'dai' in chk:
    ans[0] += 1
    ans[1] += 1
  print(' '.join(map(str,ans)))