A positive integer is called a cool number of power if it can be divided into exactly groups of consecutive digits, such that the digits in each group form an arithmetic progression. An arithmetic progression is a sequence where the difference between any two consecutive elements is the same. A positive integer is called a mega cool number of power if it is a cool number of power , but not a cool number of power a-1, and all its digits are in non-decreasing order.
Calculate the number of mega cool numbers of power that contain exactly digits (with no leading zeroes). Output the answer modulo .
Each line contains two natural numbers and (1 \leq n, a \leq 1000).
For each test, output in a separate line the number of mega cool numbers of power containing exactly digits. Output the answer modulo .
Example 1