// Arup Guha
// 2/22/2014
// Solution to 2013 Greater NY Regional Problem B: Von Neumann's Fly

import java.util.*;

public class b {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Go through each case.
		for (int loop=1; loop<=numCases; loop++) {

			// Read in data.
			int caseNum = stdin.nextInt();
			double distance = stdin.nextDouble();
			double v1 = stdin.nextDouble();
			double v2 = stdin.nextDouble();
			double flyV = stdin.nextDouble();

			// Very easy =) Just do D = RT for the fly...
			double t = distance/(v1+v2);
			System.out.printf("%d %.2f\n", loop, flyV*t);
		}
	}
}