#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long X, A, Y, B, extra = 0; cin >> X >> A >> Y >> B; if(X % Y == 0) { if(A >= B) cout << "Yes" << endl; else { extra = B / A; if(B % A != 0) extra++; long long power = pow(Y, extra); if(power > 0 && power % Y == 0 && X % power == 0) cout << "Yes" << endl; else cout << "No" << endl; } } else { if(A >= B) { extra = A / B; long long power = pow(X, extra); if(power > 0 && power % X == 0 && power % Y == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "No" << endl; } return 0; }