//* Problem  : 1634 - Lenny's Lucky Lotto Lists
//* Contest  : acm.tju.edu.cn
//* Origin   : Pacific Northwest Regionals 2004; Greater New York 2004
//* Type     : Solution
//* Date     : 2008.03.20
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0
//* Algoritm : DP

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

long long dp[16][2048], res;
int n, m;

long long count(int n, int c)
{
	if (c > m) return 0;
	if (!n) return 1;
	if (dp[n][c]) return dp[n][c] - 1;
	long long res = 0;
	for (int cc = 2 * c; cc <= m; cc++)
		res += count(n - 1, cc);
	dp[n][c] = res + 1;
	return res;
}

void solve()
{
	memset(dp, 0, sizeof(dp)); 
	res = 0;
	for (int i = 1; i <= m; i++)
		res += count(n - 1, i);
}

int main()
{
	int nt; scanf("%d", &nt);
	for (int it = 1; it <= nt; it++)
	{
		scanf("%d %d", &n, &m);
		solve();
		printf("Data set %d: %d %d %lld\n", it, n, m, res);
	}
	return 0;
}
