#include #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; ll MOD = 998244353; int main() { int n, z; cin >> n >> z; for (int x = 1; pow(x, n) < pow(z, n); x++) { for (int y = x; pow(x, n) + pow(y, n) <= pow(z, n); y++) { if (pow(x, n) + pow(y, n) == pow(z, n)) { cout << "Yes\n"; return 0; } } } cout << "No\n"; }