Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-palindrom-sonlar

Palindrome number

Easy 1000 ms 128 MB 30%
Share

Write a function IsPalindrome(x) that returns true if the positive integer $x$ is a palindrome and false otherwise. A number is a palindrome if it reads the same from left to right and from right to left.

Example 1: IsPalindrome(121) → true

Example 2: IsPalindrome(123) → false

Write only the function body.

A number goes into the function IsPalindrome, which returns true or false

Input

One line with a positive integer $x$ — the argument of the function.

Output

The value returned by the function: true or false.

Note

$1 \le x \le 10^{9}$

Examples

Input #1
121
Output #1
true
Input #2
123
Output #2
false

Sign in to submit a solution

Signing up is free and takes a minute.