#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 10000000000000000 map get(long long n){ map ret; for(long long i=2;i*i<=n;i++){ while(n%i==0){ ret[i]++; n/=i; } } if(n!=1)ret[n]++; return ret; } void NG(){ cout<<"No"<>x>>a>>y>>b; auto X = get(x); auto Y = get(y); for(auto &t:X){ t.second *= a; } for(auto &t:Y){ t.second *= b; } for(auto t:X){ if(t.second < Y[t.first])NG(); } for(auto t:Y){ if(t.second > X[t.first])NG(); } cout<<"Yes"<