n=int(input())
a=list(map(int,input().split()))
data=[0]*8
ex=0
for i in a:
  if 1<=i<400:
    data[0]+=1
  elif 400<=i<800:
    data[1]+=1
  elif 800<=i<1200:
    data[2]+=1
  elif 1200<=i<1600:
    data[3]+=1
  elif 1600<=i<2000:
    data[4]+=1
  elif 2000<=i<2400:
    data[5]+=1
  elif 2400<=i<2800:
    data[6]+=1
  elif 2800<=i<3200:
    data[7]+=1
  elif 3200<=i:
    ex+=1
if data.count(0)==8:
  if ex>8:
    print(1, 8)
  else:
    print(1, ex)
else:
  if 8-data.count(0)+ex>8:
    print(8-data.count(0), 8)
  else:
    print(8-data.count(0), 8-data.count(0)+ex)