{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"### Statement of the Problem\n\nWe say that a number is a palindrom if it is the sane when read from left to right or from right to left. For example, the number 75457 is a palindrom.\n\nOf course, the property depends on the basis in which is number is represented. The number 17 is not a palindrom in base 10, but its representation in base 2 (10001) is a palindrom.\n\nThe objective of this problem is to verify if a set of given numbers are palindroms in any basis from 2 to 16.\n\n### Input Format\n\nSeveral integer numbers comprise the input. Each number 0\u0026lt;n\u0026lt;50000 is given in decimal basis in a separate line. The input ends with a zero.\n\n### Output Format\n\nYour program must print the message Number i is palindrom in basis where I is the given number, followed by the basis where the representation of the number is a palindrom. If the number is not a palindrom in any basis between 2 and 16, your program must print the message Number i is not palindrom.\n\n### Sample:\n\n\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\n17\n19\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\nNumber 17 is palindrom in basis 2 4 16\nNumber 19 is not a palindrom\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n"}}]}