#import collections
n=int(input())
#a,b,c,d=map(int,input().split())
a=list(map(int,input().split()))
#n=int(input())
#s=input()
#mod=10**9+7
color_rate=[0]*8
sani=0
for i in a:
  if 1<=i<=399:
    color_rate[0]+=1
  elif 400<=i<=799:
    color_rate[1]+=1
  elif 800<=i<=1199:
    color_rate[2]+=1
  elif 1200<=i<=1599:
    color_rate[3]+=1
  elif 1600<=i<=1999:
    color_rate[4]+=1
  elif 2000<=i<=2399:
    color_rate[5]+=1
  elif 2400<=i<=2799:
    color_rate[6]+=1
  elif 2800<=i<=3199:
    color_rate[7]+=1
  else:
    sani+=1
saidai=0
saisyou=0
if color_rate.count(0)==8:
  saidai=min(sani,8)
  saisyou=1
elif color_rate.count(0)>=1:
  saidai=min(color_rate.count(0),sani)+8-color_rate.count(0)
  saisyou=8-color_rate.count(0)
print(saisyou,saidai)