#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<set>
//const int MOD = int(1e9) + 7;
using namespace std;
int main(){
    long long int s,p;
    cin >> s >> p;
    int flag = 0;
    for(int i =1; i< 10000000;i++){
        long long int t = pow(i,2);
        t = t - (s * i);
        if(t + p == 0){
            if(s - i > 0){
                cout << "Yes" << endl;
                flag++;
                break;
            }
        }
    }
    if(flag == 0){
        cout << "No" << endl;
    }
    
}

#include<bits/stdc++.h>
using namespace std;
long const mod = 1e9+7;
int main(){
    long s,p;
    cin >> s >> p;
    for(long i = 1;i<=sqrt(p);i++){
        if(p % i != 0)continue;
        if(i + p/i == s){
            cout << "Yes";
            return 0;
        }
    }
    cout << "No";
}