In ancient Egypt, only fractions with numerators equal to one, called unit fractions of the form , and the fraction were used. Fractions with numerators greater than one were written as a sum of unit fractions. For example:
Given natural numbers , , , and , find the number of ways to represent the fraction as a sum of unit fractions such that the number of terms does not exceed and the product of the denominators equals . Different orders of the same terms are counted as one way.
For example, the Egyptian fraction with P=2, Q=3, A=120, N=3 can be represented in ways using unit fractions:

Each test consists of several test cases, with no more than cases. Each input line contains four numbers , , , and separated by spaces.
0 \le P, Q \le 800, 0 \le A \le 12000, 0 \le N \le 7.
The input ends with a line .
For each test case, print the answer on a separate line.
Example 1