#K41812. Palindrome Number Checker

    ID: 26949 Type: Default 1000ms 256MiB

Palindrome Number Checker

Palindrome Number Checker

Given an integer \( x \), determine whether it is a palindrome. A palindrome is a number that reads the same backward as forward. For example, \( 121 \) is a palindrome while \( 123 \) is not.

Constraint: You are not allowed to convert the integer into a string or use extra space in your algorithm. Instead, you should manipulate the number mathematically. The palindrome condition can be expressed as:

[ x = \sum_{i=0}^{n-1} a_i \times 10^i ]

where \( a_i \) represents the digit at the \( i^{th} \) position.

inputFormat

The input consists of a single integer \( x \) which may be negative or non-negative. The integer is read from standard input.

outputFormat

Print a single boolean value: True if \( x \) is a palindrome, otherwise False. The output should be printed to standard output.

## sample
121
True

</p>