S = input() X, Y = set(S) if S.count(X) > 1: print(S.index(Y) + 1, Y) else: print(S.index(X) + 1, X)