n = int(input())
A = list(map(int,input().split()))
L = [False]*8
cnt = 0
for a in A:
  if 1 <= a <= 399:
    L[0] = True
  elif 400<=a<=799:
    L[1] = True
  elif 800<=a<=1199:
    L[2] = True
  elif 1200<=a<=1599:
    L[3] = True
  elif 1600<=a<=1999:
    L[4] = True
  elif 2000<=a<=2399:
    L[5] = True
  elif 2400<=a<=2799:
    L[6] = True
  elif 2800<=a<=3199:
    L[7] = True
  else:
    cnt += 1
print(sum(L),sum(L)+cnt)