/*

 ALLAH IS ALMIGHTY              ******BISMILLAHIR RAHMANIR RAHIM.******              ALLAH IS ALMIGHTY
                                    ```````````````````````````````
                                        AUTHOR: ANISUR RAHAMAN
                                            BSMRSTU(SHIICT)
                                                ID:017


                            ............LET's START OUR JOURNEY.............

*/
#include <bits/stdc++.h>

#define I_O ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

//~~~~~~~~~~~~ Sort Form Of Long~~~~~~~~~~~//
#define ll long long int
#define lls int64_t
#define ld long double
#define db double
#define ull unsigned long long int

//~~~~~~~~~~~~~~Pair~~~~~~~~~~~~~~~~~~//
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pdd pair<db,db>
#define psi pair<string,int>
#define vi vector<int>
#define vl vector<ll>
#define vd vector<db>
#define vs vector<string> 
#define vb vector<bool>
#define vpi vector<pii>
#define vpl vector<pll>
#define vpd vector<pdd>
#define vpsi vector<psi>

//~~~~~~~~~~~~~~Vector~~~~~~~~~~~~~~~~~//
#define pb push_back
#define pf push_front
#define MP make_pair
#define in insert
#define ff first
#define ss second
#define al(v) v.begin(),v.end()
#define alr(v) v.rbegin(), v.rend()
#define srt(v) sort(al(v))
#define srtr(v) sort(al(v), greater<int>());
#define len(x) ((ll)(x).length())
#define sz(x) ((ll)(x).size())
#define rev(v) reverse(al(v))
#define btcnt(n) __builtin_popcount(n)
#define acl(v, n) accumulate(al(v), n)
#define eb emplace_back
#define lb(v, kk) lower_bound(al(v), kk)
#define ub(v, kk) upper_bound(al(v), kk)
#define tpu(str) transform(al(str), str.begin(), ::toupper)
#define tpl(str) transform(al(str), str.begin(), ::tolower)
#define cignr cin.ignore(numeric_limits<streamsize>::max(), '\n');
#define mxv(v) *max_element(al(v))
#define mnv(v) *min_element(al(v))

const int MOD = 1e9 + 7;
const ll INF = 2e18;
const int mxn = 2e9 + 9;
const int mxd = 2e5 + 5;

//~~~~~~~~~~~~~~~~~~Function~~~~~~~~~~~~~~~~~~~~//
lls gcd(lls a, lls b){
    if(b == 0LL) return a;
    return gcd(b, a % b);
}

lls lcm(lls a, lls b){
    return (a / gcd(a, b) * b);
}
//~~~~~~~~~~~~~~~Loops and Short~~~~~~~~~~~~~~~~//

#define PI acos(-1)
#define C continue
#define B break
#define off return 0
#define N '\n'
#define WT(something) auto az = something; cout << az << N;
#define WTS(something) cout << something << N;
#define rep(i, n) for(lls i = 0; (lls)i < n; i++)
#define repn(i, a, b) for(lls i = (lls)(a); i < (lls)(b); i++)
#define repr(i, a, b) for(lls i = (lls)(a) - 1; i >= (lls)(b); i--)
#define test_case() int T; T = 1; while(T--)

using namespace std;

// ===================================~~~~~~ SOLUTION STARTS HERE ~~~~~~=================================== //
 
void Run_Case()
{  
    string str;
    cin >> str;
    string rev = string(alr(str));
    if (str == rev) {
        cout << "Yes" << N;
        return;
    }

    int l = len(str);
    int f = 0, k = 0;
    while (1) {
        string ka = "0" + str;
        string ra = string(alr(ka));
        if (ka == ra) {
            cout << "Yes" << N;
            return;
        }

        if (k == l) B;
        k++;
        str = ka;
    }

    cout << "No" << N;
}
 
int main()
{
    I_O
    test_case()
    {
        Run_Case();
    }
    off;
}
 

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int

static void removeTrailingCharacters(std::string &str, const char charToRemove) {
    str.erase (str.find_last_not_of(charToRemove) + 1, std::string::npos );
}

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    ll n;
    cin>>n;
    string temp=to_string(n);
    removeTrailingCharacters(temp,'0');
    string temp2=temp;
    reverse(temp2.begin(),temp2.end());
    if(temp==temp2){
        cout<<"Yes";
    }
    else{
        cout<<"No";
    }
    
}