#include int main() { long long int x, a, y, b; scanf("%lld %lld %lld %lld", &x, &a, &y, &b); long long int c1, c2, i; for (i = 2; i * i <= y; i++) { if (y % i > 0) continue; for (c1 = 0; x % i == 0; c1 += a, x /= i); for (c2 = 0; y % i == 0; c2 += b, y /= i); if (c1 < c2) { printf("No\n"); return 0; } } if (y > 1) { i = y; for (c1 = 0; x % i == 0; c1 += a, x /= i); for (c2 = 0; y % i == 0; c2 += b, y /= i); if (c1 < c2) { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }