#include using namespace std; const long long INF = 1e18; vector> prime_fact(long N) { vector> primes; int n = N; for(long i=2; i*i<=N+100; i++) { if (i != 2 && i != 5 && n % i != 0) continue; int cnt = 0; while(n % i == 0) { cnt++; n /= i; } if(i==2||i==5) cnt-=4; primes.push_back(make_pair(i, cnt)); } if (n != 1) primes.push_back(make_pair(n, 1)); return primes; } double A, B; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cin>>A>>B; long a = A * 10000; long b = B * 10000; vector> ps = prime_fact(a); bool ok = true; for(auto e:ps) { long ei = e.second; long eb = b * ei; if(!(eb >= 0 && eb % 10000 == 0)) { ok = false; } } cout<<(ok ? "Yes" : "No")<