134. Palindrome Number
EasyDigits
Print YES if the integer reads the same forwards and backwards (negative numbers are not palindromes), else NO.
Input format
A single integer n.
Output format
YES or NO
Example 1
Input
121
Output
YES
Example 2
Input
-121
Output
NO
Constraints
|n| ≤ 10¹⁸
Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.
Loading the MyLoginn IDE…