#include using namespace std; long long x, a, b, y; long long expo; long long con = 0; long long logaritmo(long long k, long long p){ con = 0; while(k > p){ if(k % p != 0)return -1; k/= p; con++; } return con; } long long logs(long long k, long long p){ con = 0; while(k >p){ if(k % p != 0)return -1; k /= p; con++; } return con; } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> x >> a >> y >> b; if(x == y && a >= b){ cout << "Yes"; return 0; } if(y == 1){ cout << "Yes" << '\n'; return 0; } if(x == 1){ cout<< "No" << '\n'; return 0; } if(x % y == 0){ expo = logaritmo(x,y); if(expo == -1){ cout << "No"; return 0; } if(a >= b/expo)cout << "Yes"; else cout << "No"; return 0; } if(y % x == 0){ expo = logs(y,x); if(expo == -1){ cout << "No"; return 0; } if(a/expo >= b){ cout << "Yes"; }else{ cout << "No"; } }else{ cout << "No"; } return 0; }