main(a,b){for(;gets(b);64%a?puts(b):printf("%dand x\n",a-1))a=atoi(b+6);}