#include <bits/stdc++.h>

// 1. dp
typedef long double ld;
#define int long long

#define gcd            __gcd
#define endl           "\n"
#define setbits(x)     __builtin_popcountll(x)
#define zrobits(x)     __builtin_ctzll(x)
#define mod            1000000007
#define mod2           998244353
#define maxe           *max_element
#define mine           *min_element
#define inf            1e18
#define pb             push_back
#define all(x)         x.begin(), x.end()
#define f              first
#define s              second
#define lb             lower_bound
#define ub             upper_bound
#define ins            insert
#define sz(x)          (int)(x).size()
#define mk             make_pair
#define deci(x, y)     fixed<<setprecision(y)<<x
#define w(t)           int t; cin>>t; while(t--)
#define nitin          ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define PI             3.141592653589793238
using namespace std;

void solve() {
    int s,p;
    cin>>s>>p;
    bool flag=false;
    for(int i=1;i*i<=p;i++)
    {
        if(p%i==0)
        {
            int j=p/i;
            if(i+j==s)
                flag=true;
        }
    }
    if(flag)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}

int32_t main() {
    nitin;

    solve();
}

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  long long s,p;
  cin>>s>>p;
  string ans="No";
  for(ll i=1;i<=1000000;i++){
    if(p%i==0){
      ll x=p/i;
      if(x+i==s)
        ans="Yes";
    }
  }
  cout<<ans<<endl;
}