#include using namespace std; typedef long long ll; ll my_pow(ll x, ll n) { if (n == 0) return 1; if (n % 2 == 0) return my_pow(x * x, n / 2); return x * my_pow(x, n - 1); } int main() { ll n, z; cin >> n >> z; for (ll x = 1; my_pow(x, n) < my_pow(z, n); x++) { ll e = my_pow(z, n) - my_pow(x, n); ll y = pow(e, (double)1 / n); if (my_pow(y, n) == e) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }