n=gets.to_i a=gets.split.map &:to_i if a.uniq.size==1 m=a[0]/(n-1)/4 if m==0 print n,' ',0 else print 0,' ',n end else x,y=a.minmax print a.count(y),' ',a.count(x) end