#include int main(void) { long long int amount, payment; int time; double rate; while(true) { scanf("%lld %lld %d %lf\n", &amount, &payment, &time, &rate); if(!amount && !payment && !time && !rate) 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"); else printf("NO\n"); } return 0; }