from collections import* s=input() c=Counter(s) t=sorted(c.items(),key=lambda x:x[1])[0][0] print(s.index(t)+1,t)