#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) { vector> ret; for(long long i = 2; i * i <= N; i++) { if(N % i != 0) continue; int e = 0; while(N % i == 0) { e++; N /= i; } ret.push_back({i, 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; }