import java.util.Scanner; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author cteam063 */ public class mortgage { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int y = scanner.nextInt(); int n = scanner.nextInt(); double r = scanner.nextDouble(); while (!(x == 0 && y == 0 && n == 0 && Math.abs(r) < 0.000001)) { if (splaceni(x, r / 12, y, n)) { System.out.println("YES"); } else { System.out.println("NO"); } x = scanner.nextInt(); y = scanner.nextInt(); n = scanner.nextInt(); r = scanner.nextDouble(); } } public static boolean splaceni(double castka, double urok, double splatka, int roku) { for (int i = 0; i < roku; i++) { for (int j = 0; j < 12; j++) { // System.out.println("DEBUG> " + castka + " " + i + " " + j + "\n"); castka = nextMonth(castka, urok, splatka); if (castka <= 0) { return true; } } } return false; } public static double nextMonth(double castka, double urok, double splatka) { return castka * ((100 + urok) / 100) - splatka; } }