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 ll = long long;
using namespace std;
const ll MOD = 1e9 + 7;
const int mxN = 501;
const int mxM = 5001;
bool poss[mxN][mxM];
pair<int, int> nex[mxN][mxM];
int val[mxN][mxM];
queue<pair<int, int>> q;
int d, s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> d >> s;
  poss[0][0] = 1;
  q.push({0, 0});
  while (!q.empty()) {
    auto p = q.front();
    q.pop();
    for (int i = 0; i < 10; ++i) {
      int nxtf = (p.first * 10 + i) % d;
      int nxts = p.second + i;
      if (nxts <= s && !poss[nxtf][nxts]) {
        poss[nxtf][nxts] = 1;
        q.push({nxtf, nxts});
        nex[nxtf][nxts] = {p.first, p.second};
        val[nxtf][nxts] = i;
      }
    }
  }
  if (!poss[0][s]) {
    cout << -1 << "\n";
  } else {
    string ans;
    pair<int, int> curr = {0, s};
    while (curr != make_pair(0, 0)) {
      ans.push_back(val[curr.first][curr.second] + '0');
      curr = nex[curr.first][curr.second];
    }
    reverse(ans.begin(), ans.end());
    cout << ans << "\n";
  }
  return 0;
}
