#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; i++) { if (n % i != 0) continue; int cnt = 0; while(n % i == 0) { cnt++; n /= i; } 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.first == 2 || e.first == 5) ? e.second - 4 : e.second; long eb = b * ei; if(!(eb >= 0 && eb % 10000 == 0)) { ok = false; } } cout<<(ok ? "Yes" : "No")<