This problem is a programming version of Problem 33 from projecteuler.net
The fraction is a curious fraction. An inexperienced mathematician while attempting to simplify it may incorrectly believe that is obtained by cancelling the s.
We shall consider fractions like, , to be trivial examples.
Which means fractions where trailing 0's are cancelled are trivial. So we will ignore all the cases where we have to cancel 0's.
You will be given 2 integers and . represents the number of digits in Numerator and Denominator, and represents the exact number of digits to be "cancelled" from Numerator and Denominator. Find every non-trivial fraction, (1) where numerator is less than denominator, (2) and the value of the reduced fraction is equal to the original fraction.
Sum all the Numerators and the Denominators of the original fractions, and print them separated by a space.
Input Format
Input contains two integers
Constraints
Output Format
Display 2 space separated integers that denote the sum of the Numerators and the sum of the Denominators respectively of original fractions.
Note You do not have to reduce the Numerator and Denominator.
Sample Input
2 1
Sample Output
110 322