from collections import Counter s = input() c = Counter(s).most_common() ans = c[1][0] print(s.index(ans) + 1, ans)