// Arup Guha
// 6/5/2014
// Solution to 2008 UCF High School Programming Contest Problem: Pepe's Perfect Pizza Palace

import java.util.*;
import java.io.*;

public class pizza {

	final public static int CAL_PER_SQIN = 10;

	public static void main(String[] args) throws IOException {

		Scanner fin = new Scanner(new File("pizza.in"));

		int numCases = fin.nextInt();

		// Process each case
		for (int loop=1; loop<=numCases; loop++) {

			// Read input.
			int perimeter = fin.nextInt();
			int full = fin.nextInt();
			int part = fin.nextInt();

			// Determine pizza radius and area.
			double radius = perimeter/(2*Math.PI);
			double area = Math.PI*radius*radius;

			// Map proportionally, add close to 1 and truncate to do ceiling.
			int calories = (int)(CAL_PER_SQIN*area*part/full + 1 - 1e-9);
			System.out.println("Perfectly Popular Pizza "+loop+": Perry consumed "+calories+" calories.");
		}

		fin.close();
	}
}