while 1:s=input();n=int(s[6:]);print([s,"%sand x"%~-n][64%n<1])