n=int(input())
a=list(map(int,input().split()))
if n==1:
  print(1)
  exit(0)
for i in range(n):
  if 1<=a[i]<=399:
    a[i]="gray"
  elif 400<=a[i]<=799:
    a[i]="brown"
  elif 800<=a[i]<=1199:
    a[i]="green"
  elif 1200<=a[i]<=1599:
    a[i]="lightblue"
  elif 1600<=a[i]<=1999:
    a[i]="blue"
  elif 2000<=a[i]<=2399:
    a[i]="yellow"
  elif 2400<=a[i]<=2799:
    a[i]="orange"
  elif 2800<=a[i]<=3199:
    a[i]="red"
  elif 3200<=a[i]:
    a[i]="free"
# print(a)
from collections import Counter
c=Counter(a)
ans=len(c)
free=c["free"]
if free>0:
  ans-=1
print(ans,ans+free)
