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