import java.util.Scanner; public class CloseEnoughComputations { Scanner in = new Scanner(System.in); float fat_CalsPerGram = 9f; float car_CalsPerGram = 4f; float pro_CalsPerGram = 4f; float pos = 0.499f; float neg = -0.5f; void start() { while (true) { int cals_total = in.nextInt(); float fat_grams = in.nextFloat(); float car_grams = in.nextFloat(); float pro_grams = in.nextFloat(); if (cals_total==0 && fat_grams==0 && car_grams==0 && pro_grams==0) return; int cals_max = Math.round( (fat_grams + pos) * fat_CalsPerGram + (car_grams + pos) * car_CalsPerGram + (pro_grams + pos) * pro_CalsPerGram); int cals_min = Math.round( (fat_grams + neg) * fat_CalsPerGram + (car_grams + neg) * car_CalsPerGram + (pro_grams + neg) * pro_CalsPerGram); if (cals_total <= cals_max && cals_total >= cals_min) { System.out.println("yes"); } else { System.out.println("no"); } } } public static void main(String[] args) { new CloseEnoughComputations().start(); } }