N=int(input())
A=list(map(int,input().split()))
C=[]
cnt=0
for i in A:
  if 1<=i<=399:
    C.append('a')
  elif 400<=i<=799:
    C.append('b')
  elif 800<=i<=1199:
    C.append('c')
  elif 1200<=i<=1599:
    C.append('d')
  elif 1600<=i<=1999:
    C.append('e')
  elif 2000<=i<=2399:
    C.append('f')
  elif 2400<=i<=2799:
    C.append('g')
  elif 2800<=i<=3199:
    C.append('h')
  else:
    cnt+=1
D=len(set(C))
if D==0:
  print(1,min(8,cnt))
else:
  minc=D
  maxc=min(8,minc+cnt)
  print(minc,maxc)