As Fry’s birthday is coming, he get a cake which is bigger than bigger to serve his friends. But some of his friends could not sure about participating in the birthday party. There may be A people on the party, or maybe B people on the party, or may be C people on the party.
Fry need to cut the cake into some pieces in advance and make sure whatever how many people there are on the party(A or B or C), all of people can get a share of cake, and all of people can get the same volume of cake. Attention any two people can not share a piece of cake.
Now Fry wants to know the minimum number of piece he need to cut.
There is a T at the beginning of input, show that there is T case follow.
For each case, there are only three integer A, B, C, means the possible number of people there will be on the party.(T<=1000,1<= A,B,C<=100)
For each case, output "Case #x: " , x mean the number of case,starting from 1.
Then for each case, output only one integer, the minimum number the cake need to be cut.
2 1 2 4 2 3 4
Case #1: 4 Case #2: 6
For the second sample, Fry can cut the cake into 1/4 + 1/4 + 1/6 + 1/6 + 1/12 + 1/12.
If there are 2 people in the party, each of them can get half of cake (1/4 + 1/6+ 1/12).
If there are 3 people in the party ,each of them can get 1/3 of cake, (1/4 + 1/12) , (1/4 + 1/12) , (1/6 + 1/6).
If there are 4 people, each of them can get 1/4 of cake, (1/4) , (1/4) , (1/6 + 1/12) , (1/6 + 1/12).