#include #include #include #include #include #include #include #include using namespace std; #define EPS 1e-12 int main() { long double x, y, r; int n; scanf("%Lf %Lf %d %Lf\n", &x, &y, &n, &r); while (x != 0) { r = 1 + (r/12)/100; for (int i = 0; i < 12*n; ++i) { x *= r; x -= y; if (x < EPS) break; } printf(x < EPS ? "YES\n" : "NO\n"); scanf("%Lf %Lf %d %Lf\n", &x, &y, &n, &r); } }