#include <bits/stdc++.h>
using namespace std;
#define MOD 998244353
#define ll long long
#define ull unsigned long long
#define ld long double
const int MAX_n = 1e5 + 5;
#define MAX_X 1000000
const int InF = 1e9; // for int
const ll INF = 1e18; // for ll
void solve()
{
int g;
cin>>g;
for(int i=1;i<=g;i++)
{
int a,b;
cin>>a>>b;
int gc=__gcd(a,b);
cout<<"Game #"<<i<<": "<<b/gc<<" / "<<a/gc<<endl;
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}