// Arup Guha
// 3/11/2014
// Solution to 2014 FHSPS Playoff Problem: Building Olaf(frozen)

import java.util.*;

public class frozen {

	// Given in problem description.
	public final static double PI = 3.141592653590;

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Go through each case.
		for (int loop=0; loop<numCases; loop++) {

			// Read in data.
			int vol = stdin.nextInt();
			int small = stdin.nextInt();
			int med = stdin.nextInt();
			int large = stdin.nextInt();

			// Figure out the ratio of the volume used for the small ball.
			double ratio = Math.pow(small,3)/(Math.pow(small,3)+Math.pow(med,3)+Math.pow(large,3));
			double volSmall = ratio*vol;

			// Use Sphere volume formula backwards and solve for r, then output.
			double smallR = Math.cbrt(3*volSmall/(4*PI));
			System.out.printf("%.2f\n", smallR);

		}
	}
}