n=int(input())
a=list(map(int, input().split()))

l=[0]*9

for i in range(n):
  if a[i]<399:
    l[0]="t"
  elif a[i]<799:
    l[1]="t"
  elif a[i]<1199:
    l[2]="t"
  elif a[i]<1599:
    l[3]="t"
  elif a[i]<1999:
    l[4]="t"
  elif a[i]<2399:
    l[5]="t"
  elif a[i]<2799:
    l[6]="t"
  elif a[i]<3199:
    l[7]="t"
  else:
    l[8]+=1
countt=l.count("t")

if l[8]==0:
  print(countt,countt)
else:
  print(countt,countt+l[8])
    