Rachu is very happy today beacause its his birthday :D and he has a bday party at home with 'r' friends.
He went to market to purchase something to eat .(He is really fond of eating :P ).
At the shop he found muffins at a very reasonable price (ohh!! he loves muffins ;) ).
He bought 'n' muffins from the shop.
After reaching home he is wondering that in how many ways he can distribute these muffins between his friends .
He shouldn't be rash so he would give atleast 1 muffin to each friend.
For rest of the muffins left he can distribute it in any manner. He is still wondering the no. of ways in which he can distribute these muffins.
Help him out by writing a code which calculates the no. of ways the muffins could be distributed and print "-1" (quotes for clarity) if its impossible for him to distribute the muffins.
Consider each muffin as similar. The no. of ways could go very large so output the reult after taking a mod with 10000007 .
The input consists of 2 integers :
n : The no. of muffins
r : The no. of friends
The required answer modulo 10000007
1<= n,r <= 100
Input: 2 1 Output: 1Input: 4 2 Output:
3Explanation
In 1st case he has 2 muffins and called only 1 friend so he gave both the muffins to him .
In 2nd case he 1st give 1 muffin each to both.
Then he can give 0 muffin to 1st friend and 2 to the 2nd or 1 muffin to each or 2 muffins to 1st friend and 0 to the 2nd.