# Define a function to find the GCD of two numbers
def gcd(a, b):
# If b is zero, return a
if b == 0:
return a
# Otherwise, recursively call the function with b and the remainder of a/b
else:
return gcd(b, a % b)
# Define a function to calculate and print the percentage of achievement unlocked
def percentage(a, u):
# Find the GCD of a and u
g = gcd(a, u)
# Simplify the fraction by dividing both by the GCD
x = u // g
y = a // g
# Print the result in the format of x / y
print(x, "/", y, sep="")
# Take the input of the number of games
G = int(input())
# Use a for loop to iterate over G times
for i in range(G):
# Take the input of the number of achievements available and unlocked
A, U = map(int, input().split())
# Print the game number
print("Game #{}: ".format(i + 1), end="")
# Call the percentage function with A and U
percentage(A, U)