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)); double dlzoba = pozicka; dlzoba *= 1 + urok / 1200; if (splatka < (dlzoba - pozicka)) { System.out.println("NO"); } 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"); } } } }