#P1070A. Find a Number

    ID: 3073 远端评测题 3000ms 256MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>dpgraphsnumber theoryshortest paths*2200

Find a Number

Description

You are given two positive integers dd and ss. Find minimal positive integer nn which is divisible by dd and has sum of digits equal to ss.

The first line contains two positive integers dd and ss (1d500,1s50001 \le d \le 500, 1 \le s \le 5000) separated by space.

Print the required number or -1 if it doesn't exist.

Input

The first line contains two positive integers dd and ss (1d500,1s50001 \le d \le 500, 1 \le s \le 5000) separated by space.

Output

Print the required number or -1 if it doesn't exist.

Samples

样例输入 1

13 50

样例输出 1

699998

样例输入 2

61 2

样例输出 2

1000000000000000000000000000001

样例输入 3

15 50

样例输出 3

-1