Given a number in the decimal numeral system, determine how many numeral systems exist in which the number ends with the digit .
The input consists of the number (0 \le N \le 10^6) and the digit (0 \le k \le 9).
Output a single integer representing the number of numeral systems where the number ends with the digit . If there are infinitely many such numeral systems, output "".
Example 1