from collections import Counter s = input() d = list(Counter(s).items()) if d[0][1] == 1: x = d[0][0] else: x = d[1][0] print(s.index(x)+1, x)