import java.util.Scanner; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author louma */ public class mortgage { public static void main(String[] args) { Scanner a = new Scanner(System.in); while (true) { String line = a.nextLine(); if (line.equals("0 0 0 0") == true) break; int pos = line.indexOf(" "); // X int pozicka = Integer.parseInt(line.substring(0, pos)); ++pos; int pos2 = line.indexOf(" ", pos); // Y int splatka = Integer.parseInt(line.substring(pos, pos2)); pos = pos2; ++pos; pos2 = line.indexOf(" ", pos); // N int splatnost = Integer.parseInt(line.substring(pos, pos2)); pos = pos2; ++pos; // R double urok = Double.parseDouble(line.substring(pos)); urok = 1 + urok / 1200; double a1 = pozicka * urok - splatka; if (splatka < (a1 - pozicka)) { System.out.println("NO"); continue; } double a2 = a1 * urok - splatka; double q = (a1 - a2) / (pozicka - a1); /* */ double a0 = pozicka - a1; double spoluZaplatene = a0 * (Math.pow(q, splatnost * 12 - 1) - 1) / (q - 1); if (spoluZaplatene < pozicka) System.out.println("NO"); else System.out.println("YES"); /* double a2 = a1 * urok; double q = a2 / a1; double spoluZaplatene = pozicka * (Math.pow(q, splatnost) - 1) / (q - 1); if (spoluZaplatene < splatka) System.out.println("NO"); else System.out.println("YES"); */ /* else { urok /= 1200; dlzoba = pozicka; for (int i = 0; i < 12 * splatnost; i++) { dlzoba = dlzoba * (1 + urok) - splatka; if (dlzoba <= 0) { System.out.println("YES"); break; } } if (dlzoba > 0) System.out.println("NO"); } */ } } }