s=input() x,y=set(s) if s.count(x)>1:x=y print(s.index(x)+1,x)