#include<bits/stdc++.h>
using namespace std;
/// .................... type def
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll N = 1e5+5;
int prime[N];
void seive(ll n){
n+=2;
int sqn = sqrt(n)+1;
for(int i=4;i<=n;i+=2) prime[i]=1;
for(int i=3;i<=sqn;i+=2){
if(prime[i]==1) continue;
for(int j=i+i;j<=n;j+=i) prime[j]=1;
}
}
int popcount(ll x)
{
int cnt=0;
for(int i=0;i<64;i++) if((x&(1ull<<i))!=0) ++cnt; return cnt;
}
void solve(int tc)
{
ll a,b; cin>>a>>b;
ll gcd = __gcd<long long> (a,b);
a= a/gcd;
b=b/gcd;
cout<<"Game #"<<tc<<": "<<b<<" "<<"/ "<<a<<endl;
}
int main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int tc=1;
int t; cin>>t; while(t--)
{
solve(tc);
++tc;
}
}