Your friend Herok loves Math so much. He is going to write some numbers on some paper. As he is your best friend you know how he writes the numbers one after another. For the first number, he writes a random integer , between 1 and inclusive. After that for the next numbers, he will choose a number such that either is divisible by the last number he wrote or the last number wrote is divisible by . For example, let and the last number he wrote was , the possible values of for the next number are . Among all the possible options of he chooses randomly. He has written numbers on some secret paper. You are wondering about what’s the last number he wrote on the paper.
Given the values of and , for each integer from to , you have to print the probability that he wrote that number as the last number. Print the probability modulo .
The input consists of 2 space-separated integers described above.
Print space-separated integers in a line, for each integer from to , the probability that Herok wrote that number as the last number. Print the probability modulo .
Input | Output |
---|---|
2 3 | 500000004 500000004 |
Input | Output |
---|---|
1 3 | 1 |