#include<bits/stdc++.h>
#define cases long long t; cin>>t; while(t--)
#define ll long long
#define MOD 1000000007
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
    ll i,j,flag=0,k,flag2=0;
    cin>>s;
    for(j=s.size()-1;j>=0;j--){
        if(s[j]!='0'){
            k=j; flag2=1; break;   
        }
    }
  	if(flag2==0) cout<<"Yes"<<endl;	
  	else{
  	    if(k%2==0){
  	        j=k;
  	        for(i=0;i<k/2;i++){
                if(s[i]!=s[j]){
   	                cout<<"No"<<endl; 
   	                flag=1;
   	                break;
   	            }
   	            j--;
   	        }
  	    }
  	    else{
  	        j=k;
  	        for(i=0;i<=k/2;i++){
                if(s[i]!=s[j]){
   	                cout<<"No"<<endl; 
   	                flag=1;
   	                break;
   	            }
                j--;
   	        }
  	    }
  	    if(flag==0) cout<<"Yes"<<endl;
    }
 	   return 0;
}
#include<bits/stdc++.h>
#define ll long long
#define x first
#define y second
#define pi pair
#define K 1000000007
using namespace std;

ll a[2000000];
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	ll test_case=1;//cin>>test_case;
	while(test_case--)
	{
        ll m,h;cin>>m>>h;
        if(h%m==0)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
	}
	return 0;
}

