#arc149a. [arc149_a]Repdigit Number

[arc149_a]Repdigit Number

Problem Statement

You are given positive integers NN and MM. Find the maximum positive integer XX that satisfies all of the following conditions.

  • XX is a positive integer less than 10N10^N, and all digits in the decimal representation of XX are the same.
  • XX is a multiple of MM.

If no positive integer XX satisfies the conditions, print -1.

Constraints

  • 1leqNleq1051\\leq N\\leq 10^5
  • 1leqMleq1091\\leq M\\leq 10^9

Input

The input is given from Standard Input in the following format:

NN MM

Output

Print the maximum positive integer XX that satisfies all of the conditions, or -1 if no such positive integer XX exists.


Sample Input 1

7 12

Sample Output 1

888888

Four positive integers XX satisfy the conditions: 444,888,444444,888888444, 888, 444444, 888888. The answer is the maximum of them, which is 888888888888.


Sample Input 2

9 12

Sample Output 2

888888888

Six positive integers XX satisfy the conditions: 444,888,444444,888888,444444444,888888888444, 888, 444444, 888888, 444444444, 888888888.


Sample Input 3

1 3

Sample Output 3

9

Three positive integers XX satisfy the conditions: 3,6,93, 6, 9.


Sample Input 4

1000 25

Sample Output 4

-1

No positive integers XX satisfy the conditions.


Sample Input 5

30 1

Sample Output 5

999999999999999999999999999999