There is a creature known as Bugcat who wants to play a counting game. At the start of the game, Bugcat chooses a fixed integer $$$k$$$. Then, starting from $$$1$$$, Bugcat begins counting upwards, but it will only call out a number if it meets at least one of the following conditions:
1. The number is a multiple of $$$k$$$.
2. The digit $$$k$$$ appears in the decimal representation of the number.
Bugcat wants to know what the $$$x$$$-th number it calls out will be. Since Bugcat is a bit slow and can only count one by one, it has tasked you with finding the answer.
The input consists of two integers, $$$k$$$ and $$$x$$$ ($$$1 \le k \le 9, x \le 10^5$$$).
Print a single integer representing the $$$x$$$-th number that Bugcat calls out.
3 5
13
4 5
16
In the first test case, the numbers Bugcat calls out are $$$3, 6, 9, 12, 13, \dots$$$. The $$$5$$$-th number in this sequence is $$$13$$$.
In the second test case, the numbers Bugcat calls out are $$$4, 8, 12, 14, 16, \dots$$$. The $$$5$$$-th number in this sequence is $$$16$$$.
| Name |
|---|


