After the fight between Mysterio and Spider-Man, Mysterio revealed Spider-man’s identity to the world. Now everyone knows that Peter Parker is Spider-Man. That’s why he is receiving unwanted attention which is affecting him and his close friend’s personal life. So Peter wants everyone to forget about his superhero identity. That’s why he visited Doctor Strange for help. After hearing his problem, Strange agreed to help him by casting a forbidden spell. But something went wrong and Strange blamed Spider-Man for his dual identity and a fight between those two superheroes began.
As the fight goes on, Doctor Strange uses a spell to put Spider-Man in a trap where Strange vanishes from one point and comes out from another to beat Spider-Man. Because of the peter tingle, Spider-Man was barely able to defend himself. Fortunately, a communication between You and Spider-Man is still connected and he wants your help to predict from which point Strange will emerge. After analyzing Strange's movement, you find that if his last attack was coming from point and Point , then his next attack will come from a point which is divisible by both and and the value of the point is positive and as small as possible.
Now write a program that will help you to predict the next attack Point of Doctor Strange, if Point A and Point B is given.
The first line will be a single integer indicating the number of test cases. The following T lines will contain two integers , separated by spaces.
You have to output T lines in format “Case X: Y”(without quotes) where is the number of test case starting from and is the smallest positive number divisible by both A and B. It is guaranteed that the result will not be greater than .
Input | Output |
---|---|
3 2 6 1 616 10 10 | Case 1: 6 Case 2: 616 Case 3: 10 |