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

d=[0 for i in range(9)]

for i in range(n):
  if 1<=a[i]<=399:
    d[0]+=1
  elif 400<=a[i]<=799:
    d[1]+=1
  elif 800<=a[i]<=1199:
    d[2]+=1
  elif 1200<=a[i]<=1599:
    d[3]+=1   
  elif 1600<=a[i]<=1999:
    d[4]+=1 
  elif 2000<=a[i]<=2399:
    d[5]+=1
  elif 2400<=a[i]<=2799:
    d[6]+=1
  elif 2800<=a[i]<=3199:
    d[7]+=1
  else:
    d[8]+=1
count=0
for i in d:
  if i!=0:
    count+=1
if count+d[7]<=9 and count-d[7]>=0:
  print(count-d[7],count+d[7])
elif count+d[7]<=9:
  print(0,count+d[7])
else:
  print(0,9)