import java.io.File; import java.io.IOException; import java.util.Scanner; public class bear { public static void main(String[] args)throws IOException { Scanner scanner = new Scanner(new File("bear.in")); int dataSets = scanner.nextInt(); //int secondNum = fi.nextInt(); //int sum = firstNum + secondNum; //System.out.println(firstNum + " + " + secondNum + " = " + sum); for (int set = 0; set < dataSets; set++) { int numBalloons = scanner.nextInt(); double poosWeight = scanner.nextDouble(); double totalBalloonVolume = 0; for (int balloon = 0; balloon < numBalloons; balloon++){ double balloonRadius = scanner.nextDouble(); totalBalloonVolume += 4.0 / 3.0 * Math.PI * balloonRadius * balloonRadius * balloonRadius; } boolean canLift = false; if (totalBalloonVolume / 1000.0 > poosWeight ){ canLift = true; } System.out.println("Data Set " + (set+1) + ":"); System.out.println((canLift) ? "Yes" : "No"); System.out.println(); } } }