Progress in artillery does not stop#562

Progress in artillery does not stop

2 seconds
64 megabytes
Medium

General Petrenko is interested in the following question: What is the largest integer that is a multiple of , which can be displayed on a device constructed using light-emitting diodes? The number of light-emitting diodes needed to display each digit is shown in the figure.

Input

A single line contains two integers and separated by a space (1 \le K \le 100, 1 \le M \le 3000).

Output

Output the single number —the answer to the General's question. If there is no such number, output .

Examples

Example 1

Loading
Loading