#include <bits/stdc++.h>
using namespace std;
 
#define M1 1000000007
#define M2 998244353
#define INF 1e18
#define ll long long
#define pll pair<ll,ll>
#define REP(i,a,b) for(ll i=a;i<b;i++)
#define REPR(i,a,b) for(ll i=b-1;i>=a;i--)
#define forr(i,n) for(ll i=0;i<n;i++)
#define F first
#define S second
#define pb push_back
#define DB pop_back
#define mp make_pair
#define MT make_tuple
#define V(a) vector<a>
#define vi vector<int>
#define vlli vector <long long>
#define endl '\n'
#define ce(ele) cout<<ele<<' '
#define cs(ele) cout<<ele<<'\n'
#define CASE(t) ll t; cin>>t; while(t--)
 
/********************************************************************/
const double pi = 3.1415926535;
/********************************************************************/
//FAST IO//
void FAST() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
 
 
/********************************************************************/
int main()
{
    FAST();
  
        ll int s,p; cin>>s>>p;
        int flag=0;
        for (ll int i=1; i*i<=p; i++)
        {
            if (p%i==0)
            {
                if (i+p/i == s){flag=1; }
            }
        }
     if (flag==1){cout<<"Yes"<<endl; }
     else {cout<<"No"<<endl; }
}
#include"bits/stdc++.h"
 
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define i64 int64_t
#define deb(x) cout<<"["<<#x<<"="<<x<<"]"<<"\n"
#define pb push_back
 
int main()
{
	fast;
	i64 a,b;
	cin>>a>>b;
	for(i64 i = 1;i<=(sqrt(b));++i)
	{
		// deb(i)// deb(j);
			i64 j = (b/i);
			if((i*j)==b&&(i+j)==a)
			{
				cout<<"Yes";
				goto next;
			}
	}
	cout<<"No";
	next:cout<<"\n";
	return 0;
}