#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;



int main(){
    ld S,P;
    cin >> S >> P;
    for(ld i=1;i<1e6+5;i++){
        
        if((ll)(P/i)==(P/i)){
            if((P/i)+i==S){
                cout << "Yes" << endl;
                return 0;
            }
            
            if(i+(P/i)==S){
                cout << "Yes" << endl;
                return 0;
            }
            
        }
        
        
        
        
    }
    cout << "No" << endl;
 }

/****************************
/////  Shubham Singhal
/////  LNMIIT
*****************************/
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp> 
// #include <functional> 
// using namespace __gnu_pbds;
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define eb emplace_back
#define lwr lower_bound
#define upr upper_bound
#define pq priority_queue
#define umap unordered_map
#define rep(i,n) for(i=0; i<n;i++)
#define repp(i,a,n) for(i=a; i<n;i++)
#define precise(x) cout<<fixed<<setprecision(x)
#define all(x) x.begin(),x.end()
#define lcm(a,b) (a*b)/__gcd(a,b)
#define prn(x) cout<<x<<"\n"
#define prn2(x, y) cout<<x<<" "<<y<<"\n"
#define prn3(x, y, z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define prn4(x, y, z, a) cout<<x<<" "<<y<<" "<<z<<" "<<a<<"\n"
#define prnv(x) for(auto i:x) cout<<i<<" "; cout<<"\n"
#define MOD 1000000007
#define MaX 300005
using namespace std;

 
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd; 
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<pil> vpil;
typedef vector<pli> vpli;
typedef vector<pll> vpll;
const long long INF64 = 1e18;
clock_t time_p=clock();
void time()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
void doc()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
}
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
}
// typedef tree<int, null_type, less<int>, rb_tree_tag, 
//              tree_order_statistics_node_update> 
//     new_data_set; 


/************************************************/

bool isprime(ll n) 
{ 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (ll i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
    return true; 
}

void solve()
{
    ll s,p;
    cin>>s>>p;
    map<ll,ll> m;
    for(ll i=1;i<=sqrt(p);i++)
    {
        if(p%i==0)
        {
            if(i*i==p)
                m[i]++;
            else
            {
                m[i]++;
                m[p/i]++;
            }
        }
    }
    // sort(all(a));
    // for(auto it : m)
    //     cout<<it.ff<<' ';
    // cout<<'\n';
    for(auto it=m.begin();it!=m.end();it++)
    {
        // cout<<it.ff<<' ';
        ll x=s-it->ff;
        // cout<<x<<' ';
        if(m.find(x)!=m.end())
        {
            // cout<<x<<'\n';
            cout<<"Yes";
            exit(0);
        }
    }
    cout<<"No\n";

}




int main()
{
    fast();
    int t=1;
    // cin>>t;
    while(t--)
        solve();
}