Working with Small Numbers

Working with summation is easy but sometimes tricky as well, especially when we have to deal with very small numbers within them. For example given the value of m, n you have to find the value of the following expression: ∑n ∑m j=1 i=1 i(i+1)(i+2)(i+3)j(j +1)(j +2)(j +3) ∑n∑m 1 =a, j=1 i=1 i(i+1)(i+2)(i+3)j(j+1)(j+2)(j+3) b 1 Or in other words if then you will have to find the values of a and b. Here a and b are two relative prime integers. The values of a and b will not always fit even in a 64-bit unsigned integer. Input The input file contains 2000 lines of inputs. Each line contains two integers which denotes the values of m and n (1 ≤ m, n ≤ 1000000000) respectively. Input is terminated by a line containing two zeroes. This line should not be processed. Output For each line of input produce four lines of outputs. The descriptions of these four lines are given below: The first line of each set contains the serial of output. Next line prints out the value of a, the third line contains the dividing line of the fraction and the fourth line contains the value of b. The length of the dividing line is equal to the length of b. Print a blank line after the output of each set of input. Sample Input 30 30 35 00 Sample Output Case 1: 29757025

9644811264 Case 2: 209