Problems
550 - Good Time Great Time
SUBMIT PROBLEM

Good Time Great Time

Time Limit: 0.5 sec

 

The Problem

Mr. Asif got some chocolate from his office as gift. He bring this chocolates to his house for his loving two sons. His elder son is Zarif and younger son is Zawad. Zawad is physically weak than Zarif that why Mr. Asif give them chocolates with a condition. First time they can take one chocolate per head, after than Zarif can take another one after certain time from the time of taking previous one. Also same condition applicable for Zawad. You should find out after taking first one when they will take another chocolate at the same time together.

 

Example:

If Zarif's time period is 10 and Zawad's time period is: 5 then they will take chocolate at the same time in every 10 minutes.

 

The Input

In the first line is an integer T (1<= T < 100) which is number of test cases. You have to take two integer also have a space between two integer M and N (M = Zarif's time period and N = Zawad's time period) in next T line. (1 <= M, N <= 1000000)

 

The Output

You have to print the result, G that when they take chocolate at same time together in given format below.

If they can take chocolate always at same time and nobody can take any chocolate between the times, then print "Yahoo, always we have great time in every G minute" otherwise print "Yes, we have a good time after every G minute".

 

Sample Input

3

1 7

3 11

1 1

 

Sample Output

Case 1: "Yes, we have a good time after every 7 minutes"

Case 2: "Yes, we have a good time after every 33 minutes"

Case 3: "Yahoo, always we have great time in every 1 minute"

 

 

 

 

Problem Setter: Md. Abdullah Saleh [Green University of Bangladesh]