Problem J
How Many Solutions?

Input: Standard Input

Output: Standard Output

Time Limit: 2 Second

 

Given the values of three integers m, n, p how many integer solutions does the following equation have?


Input

The input file contains at most 1001 sets of inputs. Each set of input is given in a single line containing three integers which denotes the values of m, n and p respectively.

 

Input is terminated by a case where the value of m, n and p (-1000 ≤ m, n, p ≤ 1000) is zero.

 

Output

For each set of input produce one line of output which contains the serial of output followed by an integer N which indicates how many solutions are there for the given value of m, n and p.

 

Sample Input                               Output for Sample Input

1 2 4
2 3 4
0 0 0

Case 1: 11

Case 2: 23

 


Problem setter: Shahriar Manzoor, EPS

Be ware!! This problem has no alternate solution.

 

Comment:

The equation corresponding to the first sample input is:  and the 11 solutions corresponding to this equation is:

 

-28 7

-12 6

-4 4

2 -8

3 -24

5 40

6 24

8 16

12 12

20 10

36 9