fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int x, a , b , c , d;
  6. cin>>x;
  7. a=x%10;
  8. b=x/10;
  9. c=x/100%10;
  10. d=x/1000;
  11. if (a==d and b==c) {
  12. cout<<"YES";
  13. }
  14. else {
  15. cout<<"NO"<<endl;
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 5284KB
stdin
2552
stdout
NO