eolymp
bolt
Try our new interface for solving problems
Problems

Four-digit palindrom

published at 2/11/24, 9:59:27 am

include <bits/stdc++.h>

using namespace std;

int main() {

iosbase::syncwith_stdio(false); cin.tie(nullptr); long long n; cin>>n; int a=n/1000; int b=n/100%10; int c=n%100/10; int d=n%10; if(a==d && b==c){ cout<<"YES"; } else{ cout<<"NO"; } }