<>;@c=glob<>;$-+=$c[$-]<=$c[$j=$-+1]||-(@c[$-,$j]=@c[$j,$-,push@m,"$- $j "])while$-<$#c;print@m.$/,@m