Fork me on GitHub

teddy online judge

teddy es un oso de peluche

26. S-Palindromes

Limite de tiempo : 1 seg.   Total runs : 457  Aceptados : 101

A palindromic number is a 'symmetrical' number like 16461, that remains the same when its digits are reversed. An S-palindrome is a number like 11, that when multiplied by two, yields a palindromic number.

Input

The input will consist of a sequence of test cases followed by a zero, each one in a line by its own. Each test case will consist of a single integer n (n ≤ 1×1018).

Output

For each test case display the line "Case k is an S-Palindrome." or the line "Case k is not an S-Palindrome.", where k corresponds to the case number (they are sequentially numbered starting with 1).

Sample Input

1
22
59
0


Sample Output

Case 1 is an S-Palindrome.
Case 2 is an S-Palindrome.
Case 3 is not an S-Palindrome.


Luis Héctor Chávez
2007-04-29
1er Concurso Local de Programacion del Club de Progra

Hecho por Alan Gonzalez @_alanboy ; Concepto Luis Hector Chavez @lhchavez ; Infraestructura por Instituto Tecnologico de Celaya

contribuciones de los usuarios bajo la licencia cc-wiki con atribucion requerida