S=input() a,b=set(S) if S.count(a)>1:a=b print(S.index(a)+1,a)