v=i=j=1 System.in.readLines().sort(V={-(it-~/.* /as int)}).any{j=v-(v=u=-V(it))?i:j ++i println"$j $it"}