#include<bits/stdc++.h>

#pragma GCC optimize("O2")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")

#define int long long

#define pii pair<int,int>
#define ii int,int
#define fi first
#define se second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define umap unordered_map
#define BIT(mask, i) ((mask >> i)&1)
#define ALL(c) c.begin(), c.end()

using namespace std;

mt19937 rd(chrono::high_resolution_clock::now().time_since_epoch().count());
int rand(int l, int r){
    return  l + rd()*rd()%(r-l+1);
}

const int N = 1e6+7;
const int M = 1e3+3;
const int MOD = 1e9+7;
const int inf = 3e18;

bool check(int l, int r, string a){
    if(a[l] != a[r]) return false;
    if(l >= r) return true;
    return check(l+1, r-1, a);
}

void solve(){
    string a;
    cin >> a;
    int n = a.size() - 1;
    if(check(0, n, a)) cout << "YES";
    else cout << "NO";
}

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();
}
