#include using namespace std; long long INPUT() { string S; cin >> S; int N = S.size(); long long ret = 0; bool minus = false; for(int i = 0; i < N; i++) { if(S[i] == '-') minus = true; else if(S[i] != '.') ret = 10 * ret + (S[i] - '0'); } if(minus) ret *= -1; return ret; } vector> factorize(long long N) { long long SQ = 100005; vector is_prime(SQ, true); is_prime[0] = is_prime[1] = false; vector primes; for(int i = 2; i < SQ; i++) { if(!is_prime[i]) continue; primes.push_back(i); for(int j = 2 * i; j < SQ; j += i) { is_prime[j] = false; } } vector> ret; for(auto p : primes) { int e = 0; while(N % p == 0) { e++; N /= p; } ret.push_back({p, e}); } if(N != 1) ret.push_back({N, 1}); return ret; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long A = INPUT(); long long B = INPUT(); auto fact = factorize(A); for(auto [p, e] : fact) { if(p == 2 || p == 5) e -= 4; if(e * B % 10000 != 0 || e * B < 0) { cout << "No\n"; return 0; } } cout << "Yes\n"; return 0; }