#include <stdio.h>
// Function to find the greatest common divisor
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
// Function to print irreducible fraction
void printFraction(int numerator, int denominator) {
int divisor = gcd(numerator, denominator);
printf("%d / %d\n", numerator / divisor, denominator / divisor);
}
int main() {
int G, A, U;
// Input the number of games
scanf("%d", &G);
for (int i = 1; i <= G; i++) {
// Input the number of achievements and unlocked achievements for each game
scanf("%d %d", &A, &U);
// Calculate the percentage and print irreducible fraction
printf("Game #%d: ", i);
if (A == 0) {
printf("0 / 1\n"); // To handle the case where no achievements are available in the game
} else {
printFraction(U, A);
}
}
return 0;
}