#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; template bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } ll pow(ll x, ll n){ ll ret = 1ll; rep(i, n) ret *= x; return ret; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll n, z; cin >> n >> z; for(int x = 1; pow(x, n) <= pow(z, n); x++){ for(int y = 1; pow(y, n) <= pow(z, n); y++){ if(pow(x, n) + pow(y, n) == pow(z, n)){ cout << "Yes" << endl; exit(0); } } } cout << "No" << endl; }