using C=System.Console;class M{static void Main(){var s=C.ReadLine();int i=int.Parse(s.Split()[2]);C.WriteLine(64%i<1?i-1+"and x":s);Main();}}