#include #define rep(i,n) for(int i=0;i f, primes; Sieve(int n=1):n(n), f(n+1) { f[0] = f[1] = -1; for (long long i = 2; i <= n; ++i) { if (f[i]) continue; primes.push_back(i); f[i] = i; for (long long j = i*i; j <= n; j += i) { if (!f[j]) f[j] = i; } } } vector> factor(int x) { vector> res; for (int p : primes) { int y = 0; while (x%p == 0) x /= p, ++y; res.emplace_back(p,y); } if (x != 1) res.emplace_back(x,1); return res; } }; long long INPUT(){ long double x; cin >> x; return round(x * 10000); } int solve(){ long long a = INPUT(); long long b = INPUT(); Sieve sieve(100005); auto f = sieve.factor(a); for(auto& [p, num] : f){ if(p == 2) num -= 4; if(p == 5) num -= 4; } string ans = "Yes"; for(auto [p, num] : f){ if(num * b < 0) ans = "No"; if(num * b % 10000 != 0) ans = "No"; } cout << ans << "\n"; return 0; } int main(){ solve(); return 0; }