// Michael Galletti
// 3/12/2014
// Solution to FHSPS Problem: Building Olaf(frozen)

import java.util.*;
import java.io.*;

public class frozen_galletti {
	static double PI = 3.141592653590; //As specified in the problem specification
	public static void main(String[] args) throws Exception{
		Scanner reader = new Scanner(new File("frozen.in"));
		int times = reader.nextInt();
		for(int t = 1; t <= times; t++){
			double volume = reader.nextDouble();
			double r1 = reader.nextDouble();
			double r2 = reader.nextDouble();
			double r3 = reader.nextDouble();
			
			//We know the total volume of the snowman, which is the sum of the volumes of the 3 spheres.
			//We know the ratio of the three radii, so we can express the total volume as a sum in terms of the smallest radius:
			//V = 4*PI/3 * ((r * (r1/r1))^3 + (r * (r2/r1))^3 + (r * (r3/r1))^3)
			//We can then solve for r.
			double sum = (1 + Math.pow(r2/r1,3) + Math.pow(r3/r1,3));
			double radius = Math.pow((3*volume) / (4*Math.PI*sum), 1./3.);
			System.out.printf("%.2f\n",radius);
		}
	}
}
