#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(int i=(a);i<(b);++i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define MOD 1000000007 int main(){ ll n,z; cin>>n>>z; ll a = pow(z,n); rep(i,1,1000001){ ll j = a-i; if(j<=0)continue; ll b = pow(i,1./n); ll c = pow(j,1./n); if(b*b==i&&c*c==j){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }