// Arup Guha
// 9/18/2013
// Solution to 2012 UCF HS Contest Problem: Chief

import java.util.*;
import java.io.*;

public class chief {

	public static void main(String[] args) throws Exception {

		Scanner stdin = new Scanner(new File("chief.in"));
		int numCases = stdin.nextInt();

		// Process each case.
		for (int loop=1; loop<=numCases; loop++) {

			// Read in blocks.
			int n = stdin.nextInt();
			double r = stdin.nextInt();
			block[] set = new block[n];
			for (int i=0; i<n; i++) {
				double l = stdin.nextDouble();
				double w = stdin.nextDouble();
				double h = stdin.nextDouble();
				set[i] = new block(l,w,h);
			}

			// Let's us do the greedy, eat smaller blocks first.
			Arrays.sort(set);

			// Try it out and output the result.
			if (canDo(set, r))
				System.out.println("Problem Set #"+loop+": It's going to be a good set!");
			else
				System.out.println("Problem Set #"+loop+": We need to rebuild this!");
		}

		stdin.close();
	}

	// Assumes set is sorted and determines if a sphere with the given radius can "eat" all the blocks.
	public static boolean canDo(block[] set, double radius) {

		// Set initial volume.
		double Vsphere = 4.0/3*Math.PI*Math.pow(radius, 3);

		// Go through each block.
		for (int i=0; i<set.length; i++) {

			// Can't eat it.
			if (radius <= set[i].height/2+1e-10) return false;

			// Update volume and solve back for the new radius.
			Vsphere += set[i].volume();
			radius = Math.pow(Vsphere*3/4/Math.PI, 1.0/3);
		}

		return true;
	}
}

class block implements Comparable<block> {

	public double length;
	public double width;
	public double height;

	public block(double l, double w, double h) {
		length = l;
		width = w;
		height = h;
	}

	public double volume() {
		return length*width*height;
	}

	// This is how we want to sort them; by height.
	public int compareTo(block other) {
		double diff = this.height - other.height;
		if (diff < -1e-10) return -1;
		if (diff > 1e-10) return 1;
		return 0;
	}
}