#include using namespace std; using ll = long long; #define rep(i, s, t) for (ll i = s; i < (ll)(t); i++) #define all(x) begin(x), end(x) template bool chmin(T& x, T y) { return x > y ? (x = y, true) : false; } template bool chmax(T& x, T y) { return x < y ? (x = y, true) : false; } struct io_setup { io_setup() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); } } io_setup; namespace cho { std::vector prime_table(int n) { std::vector p(n + 1, -1); for (int i = 2; i * i <= n; i++) { if (p[i] != -1) continue; for (int j = i * i; j <= n; j += i) { p[j] = i; } } return p; } std::map table_factor(int n) { const static std::vector table = prime_table(1e7); assert(n <= 1e7); std::map res; while (n > 1) { if (table[n] == -1) { res[n]++; break; } res[table[n]]++; n /= table[n]; } return res; } } // namespace cho void solve() { ll n, x; cin >> n >> x; auto mp = cho::table_factor(n); for (auto [a, k] : mp) { if (k < x) continue; ll b = n / (ll)pow(a, x); if (a != b) { cout << "Yes\n"; return; } } cout << "No\n"; } int main() { int t = 1; // cin >> t; while (t--) solve(); }