S = set(input()) if len(S) == 1: print(1, ord(S.pop()) - ord("A") + 2) else: print(1)