#63Easy
Palindromic number
Time: 1 s · Memory: 256 MB
- Working with numbers
Statement
You are given a natural number . Is it a palindrome, i.e. does it read the same left to right and right to left?
Input format
A single integer ().
Output format
YES if it is a palindrome, NO otherwise.
Examples
Input
12321
Output
YES
Input
1231
Output
NO
Note
Reverse the number (as in the previous problem) and compare it with the original. reversed is , so it is not a palindrome.
Numbers up to need long long in C++ and int64 in Go.
