Same quantity, sum and product#6086

Same quantity, sum and product

4 seconds
64 megabytes
Easy

Your task is to write a program, which will count how many different multisets have elements with sum and product (1 \le N \le 2^5 = 32, 1 \le S \le 2^{15} = 32768 and 1 \le P \le 2^{36} = 68719476736).

Two multisets are considered different when they differ by elements or by quantities of some elements. If two sequences differ by elements' order only, they are the same multiset.

Input

Input contains three space-separated integers , and in the same line.

1 \le N \le 2^5 = 32, 1 \le S \le 2^{15} = 32768 and 1 \le P \le 2^{36} = 68719476736.

Output

Output exactly one integer number — the quantity of different multisets.

Examples

Example 1

Loading
Loading

Note

The multisets for st test case are:

1\ 2\ 3\ 4\ 5\ 6\ 7\ 8\ 9

1\ 2\ 3\ 4\ 6\ 6\ 6\ 7\ 10

1\ 2\ 4\ 4\ 4\ 5\ 7\ 9\ 9

1\ 3\ 3\ 3\ 4\ 6\ 7\ 8\ 10

1\ 3\ 3\ 4\ 4\ 4\ 7\ 9\ 10

1\ 3\ 3\ 4\ 4\ 5\ 6\ 7\ 12

2\ 2\ 2\ 3\ 4\ 6\ 7\ 9\ 10

2\ 2\ 2\ 3\ 5\ 6\ 6\ 7\ 12

2\ 2\ 3\ 3\ 3\ 5\ 7\ 8\ 12

2\ 2\ 3\ 3\ 4\ 5\ 6\ 6\ 14

2\ 3\ 3\ 3\ 3\ 4\ 5\ 8\ 14

2\ 3\ 3\ 3\ 4\ 4\ 4\ 7\ 15