N=int(input())
A=list(map(int,input().split()))
aa=0
b=0
c=0
d=0
e=0
f=0
g=0
h=0
z=0
for a in A:
  if 3200<=a:
    z+=1
  elif 2800<=a:
    h=1
  elif 2400<=a:
    g=1
  elif 2000<=a:
    f=1
  elif 1600<=a:
    e=1
  elif 1200<=a:
    d=1
  elif 800<=a:
    c=1
  elif 400<=a:
    b=1
  else:
    aa=1
y=aa+b+c+d+e+f+g+h
print(y,min(y+z,8))