Alan wants a new phone password but he's rather picky.
Firstly, he wants the password to contain digits. Secondly, he wants the sum of the digits to equal . Thirdly, he wants the product of the digits to equal . Finally, he does not want the password to contain the digit .
Please help Alan find the lexicographically smallest password that satisfies his conditions.
Input Specification
The first line and only line will contain two space-separated integers, and .
Output Specification
Output the lexicographically smallest password that satisfies Alan's conditions. It is guaranteed that a solution exists.
Sample Input
15 120
Sample Output
12345
Explanation
42531
, 32415
, 23145
etc. also satisfy Alan's requirements, but 12345
is the lexicographically smallest solution.
Comments