// Arup Guha
// 3/12/2018
// Solution to 2018 UCF HS Contest Problem: Pizza Packing

import java.util.*;

public class pizza {

	// Ratio of height to side length in equilateral triangle.
	final public static double HEIGHT = Math.sqrt(3)/2;

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int nC = stdin.nextInt();

		// Process each case.
		for (int loop=1; loop<=nC; loop++) {

			// Read in the input.
			int numT = stdin.nextInt();
			int side = stdin.nextInt();

			// We form a long rectangle with all pieces lined up in a row.
			// length is number of triangles plus one divided by 2. Each time we add
			// one triangle, our length grows by half the length of a side.
			double res = (numT+1)/2.0*HEIGHT;

			// Scale up the area according to the side length.
			System.out.printf("Order #%d: %.3f\n", loop, res*side*side);
		}
	}
}