#include #include #include using namespace std; int main() { long double X, Y, N, c; while(cin>>X>>Y>>N>>c,N>0.5) //scanf("%lf %lf %lf %lf", &X, &Y, &N, &c),N>0.5) { c/= 1200.0; c+= 1.0; long double dpt = X, k; for(int i=1; i<=N; i++) { k = pow(c,12.0); dpt = k*dpt - Y * ( (k-1.0) / (c-1.0) ); if (dpt<1e-8) break; } //printf("%lf\n",(double)dpt); if (dpt <= 1e-8) printf("YES\n"); else printf("NO\n"); } return 0; }