#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(int)(x);i<(int)(y);i++)
#define print(A,x,n) rep(i,0,n){cout<<(i ? " ":"")<<A[i]x;}cout<<endl;
#define pprint(A,y,m,n) rep(j,0,m){print(A[j],y,n);}
const long mod=1e9+7;
const int siz=1e5;
const int inf=1e9;
int main(){
	string s; cin>>s;
	int n = s.size();
	rep(i,0,n){
		bool flag = true;
		rep(j,0,s.size()){
			if(s[j] != s[s.size()-1-j]) flag = false;
		}
		if(flag){ cout<<"Yes"<<endl; return 0; }
		s = "0" + s;
	}cout<<"No"<<endl;
}
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;


#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
#define m0(x) memset(x,0,sizeof(x))

int dx4[4] = {1,0,-1,0}, dy4[4] = {0,1,0,-1};

int main()
{
    ll n;
    cin>>n;
    set<ll> s;
    for (ll a = 2; a <= sqrt(n); a++)
    {
        if(s.find(a)!=s.end()) continue;
        for (ll b = a*a; b<=n; b*=a)
        {
            s.insert(b);
        }
    }
    cout<<n-s.size()<<endl;
    
    return 0;
}