Problem 7 : Genie



Problem

Aladdin rubs the lamp and lo! comes out the genie. However, this is not the same genie that you have heard about in the Arabian Nights. The genie himself has a lamp with him. He rubs the lamp, and out come N more genies, each of them also having a lamp a with themselves. However, each of the genies has a hight only 1/(N+1) of the previous genie. Each genie rubs his lamp, and this continues, till the genies reach the smallest size, of height 1. It is actually these small genies that do all the work for Aladdin. The peculiarity of each of these genies is that each of them has a height which is an integer.

Given the height of the initial genie and the number of genies of height 1, you have the find the number of genies that are not doing any work (i.e. genies of height greater than 1). You also have to determine the sum total of the heights of all the genies.

Input

The input consists of several test cases. Each case appears on a single line. A line has two integers, separated by a white space. The first integer is the height of the original genie and the second is the number of working genies (i.e. genies of height 1). The input is terminated by the case "0 0". You do not have to process this case.

Output

For each input case, print the number of genies that are not working and the sum total of the height of all the genies, separated by a blank space. All the input and output numbers will fit into 64 bit signed integer representation.

Sample Input

216 125
5764801 1679616
0 0

Sample Output

31 671
335923 30275911