import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) from collections import Counter s = S() if s.count(s[0]) == 1: print(1, s[0]) else: a = s.replace(s[0], "") print(s.index(a)+1, a)