You are given two positive integers d and s. Find minimal positive integer n which is divisible by d and has sum of digits equal to s.

Input

The first line contains two positive integers d and s (1 ≤ d ≤ 500, 1 ≤ s ≤ 5000) separated by space.

Output

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

Examples

Input

13 50


Output

699998


Input

61 2


Output

1000000000000000000000000000001


Input

15 50


Output

-1
#include <bits/stdc++.h>
using namespace std;
struct qwe {
  int a, b;
  string s;
} q;
queue<struct qwe> v;
int mn[505][5005];
int main() {
  int a, b, i;
  scanf("%d%d", &a, &b);
  q.a = 0;
  q.b = 0;
  q.s = "";
  v.push(q);
  mn[0][0] = 1;
  while (!v.empty()) {
    struct qwe w = v.front();
    v.pop();
    if (w.a > b) continue;
    if (w.a == b && w.b == 0) {
      cout << w.s << endl;
      return 0;
    }
    for (i = 0; i <= 9; i++) {
      int sum = w.a + i;
      int mod = (w.b * 10 + i) % a;
      if (!mn[mod][sum]) {
        mn[mod][sum] = 1;
        struct qwe z;
        z.a = sum;
        z.b = mod;
        z.s = w.s + (char)(i + '0');
        v.push(z);
      }
    }
  }
  printf("-1\n");
  return 0;
}
