#include int main(void) { long long int amount, payment; int time; double rate; while(true) { scanf("%lld %lld %d %lf", &amount, &payment, &time, &rate); if(!amount && !payment && !time && rate < 1E-4) break; time *= 12; double amountToPay = amount; rate = 1 + rate / 1200; while(time-- > 0 && amountToPay > 0) { amountToPay *= rate; amountToPay -= payment; if(amountToPay < 1E-8) { printf("YES\n"); break; } else if(time == 0) printf("NO\n"); } } return 0; }