s=input() a=[x for x in s if s.count(x)==1].pop() print(len(s.split(a)[0])+1,a)