// Arup Guha
// 5/2/2014
// Solution to UCF HS Contest Problem: My Spidey sense is Tingling!

import java.util.*;
import java.io.*;

public class tingling {

	public static void main(String[] args) throws Exception {

		Scanner fin = new Scanner(new File("tingling.in"));

		// Process all cases - since we're mapping ratios of different circles, there is just a fixed
		// ratio between the input and answer. Formally r = sqrt(p*p/pi) = p/sqrt(pi).
		int numCases = fin.nextInt();
		for (int loop=1; loop<=numCases; loop++) {
			String name = fin.next();
			double power = fin.nextDouble();
			System.out.printf("%s is %.3f feet away.\n", name, power/Math.sqrt(Math.PI));
		}
		fin.close();
	}
}