#include using std::cin; using std::cout; using ll = long long; int main() { ll x, a, y, b; cin >> x >> a >> y >> b; if (x % y == 0 and b % a == 0) { b /= a; if (x % (ll)pow(y, b) == 0) puts("Yes"); else puts("No"); } else puts("No"); return 0; }