from collections import Counter S = input() C = Counter(S) for k, v in C.items(): if v == 1: ans = k break print(S.index(ans) + 1, ans)