Problem:
Score : 100 points

Problem Statement

You are given a three-digit positive integer N.

Determine whether N is a palindromic number.

Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Constraints

100≤N≤999

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If N is a palindromic number, print Yes; otherwise, print No.

Sample Input 1

575

Sample Output 1

Yes

N=575 is also 575 when read backward, so it is a palindromic number. You should print Yes.

Sample Input 2

123

Sample Output 2

No

N=123 becomes 321 when read backward, so it is not a palindromic number. You should print No.

Sample Input 3

812

Sample Output 3

No

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define ll long long
typedef vector<vector<ll> > matrix;
#define pb push_back
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const double PI  =3.141592653589793238463;
long long MOD = 1000000007;

int stringToInteger(string x){
    int gg=0;
    stringstream geek(x);
    geek >> gg;
    return gg;
}

ll powmod(ll a,ll b,ll m)
{
    ll ans=1;
    while(b>0){ if(b%2)
        {ans*=a; ans%=m;}
         b/=2; a=a*a; a=a%m;
        }
        return ans%m;
}
ll gcd(ll a,ll b)
{

    return __gcd(a,b);
}
ll mulmod(ll a,ll b,ll m)
{  ll ans=0;
    a %=m;
    while (b>0)
    {       if(b&1) ans = (ans + a) % m;
        a = (a * 2)%m;
        b /= 2;
    }
    return ans % m;
}

ll f[2000001];



ll pow(ll a, ll b, ll MOD)
{
 ll x=1,y=a;
 while(b > 0)
 	{
 		if(b%2 == 1)
 	{
 		x=(x*y);
 		if(x>MOD) x%=MOD;
 	}
 	y = (y*y);
 	if(y>MOD) y%=MOD;
 	b /= 2;
 	}
 return x;
}

/* Modular Multiplicative Inverse
 Using Euler's Theorem
 a^(phi(m)) = 1 (mod m)
 a^(-1) = a^(m-2) (mod m) */
ll InverseEuler(ll n, ll MOD)
{
 return pow(n,MOD-2,MOD);
}

bool prime[100005];
void seive()
{  memset(prime,true,sizeof(prime));
    for(int i=2;i*i<=100005;i++)
    {
         if(prime[i]==true) {
        for(int j=2*i;j<=(100005);j+=i)
           { prime[j]=false;}
           }

    }
}
bool in(float x1,float y1,float x,float y,float r )
{
    if(abs(x1-x)*abs(x1-x)+abs(y1-y)*abs(y1-y)<=r*r) return true;
    return false;
}
bool cmp(pair<int,int> &a,pair<int,int> &b)
{

        return (a.second<b.second);
}
//
//vector<vector<int> >matrix;
matrix mul(matrix A,matrix B)
{
    matrix C(3, vector<ll>(3));
    for(int i=1;i<=2;i++)
    for(int j=1;j<=2;j++)
     for(int k=1;k<=2;k++)
         C[i][j] = (C[i][j] + A[i][k] * B[k][j]);
    return C;

}
matrix pow(matrix A, int p)
{
    if (p == 1)
        return A;
    if (p % 2)
        return mul(A, pow(A, p-1));
    matrix X = pow(A, p/2);
    return mul(X, X);
}
ll fib(int N,int a,int b)
{
    vector<ll> F1(3);
    F1[1] = a;
    F1[2] = b;
    matrix T(3, vector<ll>(3));
    T[1][1] = 0, T[1][2] = 1;
    T[2][1] = -1, T[2][2] = 1;
    if (N == 1)
        return a;
    if(N==2) return b;
    T = pow(T, N-1);
    ll res = 0;
    for(int i=1;i<=2;i++)
        res = (res + T[1][i] * F1[i]+ MOD)%MOD ;
    return res;
}

//1 2 3 4 5
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

 int t =1;
 while(t--)
  {
      string s;
      cin>>s;
      string t = s;
      reverse(s.begin(),s.end());
      if(s==t) cout<<"Yes";
      else cout<<"No";
      
     // 3 0 3 0 3

  }
}