S=input()

[a,b]=list(set(S))

if S.count(a)==1:
    x=a
else:
    x=b

print(S.index(x)+1,x)