n = input() if len(set([s for s in n]))==1: print(1,ord(n[0])-ord('A')+2) else: print(1)