#include #include using namespace std; using ll = long long; int main(){ int n; ll z; cin >> n >> z; if(n >= 3){ cout << "No" << endl; return 0; } else{ ll tmp = pow(z, n); for(ll x = 1; x < z; x++){ ll y1 = tmp - pow(x, n); ll k = sqrt(y1); for(int i = -1; i <= 1; i++){ if(y1 == pow(k + i, n)){ cout << "Yes" << endl; return 0; } } } } }