A. Numbers (Div-2 only!)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The most challenging exam for the students of the Recreational Mathematics Department is the exam in numeric shifts. Every year problems in this subject become more and more difficult. For the latest exam Professor Numberski has prepared something unbelievable.

The decimal notation of a certain number begins from a group of digits which will be denoted as B. In other words, the initial number is BX. If we multiply this number by A, the result of multiplication will be a number obtained by rewriting the group of digits B from the beginning to the end of the initial number, which means the final result of multiplication is XB.

The task of students is to find the minimal possible initial number BX based on given A and B.

Input

The only line contains two integers A and B (2 ≤ A ≤ 9, 1 ≤ B ≤ 106).

Output

The only number — solution of the task, or -1 if there is no solution.

Examples
Input
5 1
Output
-1
Input
3 1
Output
142857