// Arup Guha
// 7/9/08
// Solution for 2008 BHCSI Week #1 Contest Problem: squirt

import java.util.*;
import java.io.*;

public class squirt {
	
	
	public static void main(String[] args) throws IOException {
		
		Scanner fin = new Scanner(new File("squirt.in"));

		// Get the number of input cases.		
		int n = fin.nextInt();
		
		// Loop through them all.
		for (int i=1; i<=n; i++) {
			
			// Get the two values for the problem.
			double start = fin.nextDouble();
			double end = fin.nextDouble();
			
			int cnt = 0;
			
			// We stop when start is lower than end.
			while (start >= end) {
				
				// Take the square root once.
				start = Math.sqrt(start);
				
				// Add one to our count to indicate that we've taken the sqrt
				// one more time.
				cnt++;
			}
			
			// Print out the result for this case.
			System.out.println("Test case #"+i+": Squirt pressed the SQRT button "+cnt+" times.");
		}
		
		fin.close();
	}
}