#include <bits/stdc++.h>
using namespace std;
class Timer {
  clock_t start;
  string name;

 public:
  Timer() {
    name = "";
    start = clock();
  }
  Timer(string s) {
    name = s;
    start = clock();
  }
  ~Timer() {
    fprintf(stderr, "%s: %.3gs\n", name.c_str(),
            1.0 * (clock() - start) / CLOCKS_PER_SEC);
  }
};
const double EPS = 1e-9;
const long double PI = acos(-1.0L);
template <typename dtype>
inline dtype sq(dtype a) {
  return a * a;
}
template <typename dtype1, typename dtype2>
inline pair<dtype1, dtype2> mp(dtype1 a, dtype2 b) {
  return make_pair(a, b);
}
template <typename dtype1, typename dtype2>
inline dtype1 safeMod(dtype1 a, dtype2 m) {
  return (a % m + m) % m;
}
template <typename dtype1, typename dtype2>
inline bool isEq(dtype1 a, dtype2 b) {
  return abs(a - b) < EPS;
}
template <typename dtype1, typename dtype2, typename dtype3>
inline bool isEq(dtype1 a, dtype2 b, dtype3 eps) {
  return abs(a - b) < eps;
}
template <typename dtype>
inline dtype toRad(dtype deg) {
  return deg * PI / 180.0;
}
template <typename dtype>
inline dtype toDeg(dtype rad) {
  return rad * 180.0 / PI;
}
template <typename dtype>
inline bool isKthBitOn(dtype n, int k) {
  assert(n <= numeric_limits<dtype>::max());
  assert(k <= numeric_limits<dtype>::digits);
  dtype ONE = 1;
  return bool((n & (ONE << k)));
}
template <typename dtype>
inline void setKthBit(dtype& n, int k) {
  assert(n <= numeric_limits<dtype>::max());
  assert(k <= numeric_limits<dtype>::digits);
  dtype ONE = 1;
  n = (n | (ONE << k));
}
const int oo = 0x3f3f3f3f;
const int MAX = 110;
const int MOD = 1000000007;
const int precision = 10;
int m, s;
int ara[MAX];
int lara[MAX];
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> m >> s;
  if (m * 9 < s || (s == 0 && m != 1)) {
    cout << "-1 -1";
    return 0;
  }
  if (m == 1) {
    cout << s << " " << s;
    return 0;
  }
  int ss = s - 1;
  for (int i = m - 1; i > 0; i--) {
    ara[i] = min(9, ss);
    ss -= min(9, ss);
  }
  ara[0] = max(1, ss + 1);
  ss = s;
  for (int i = 0; i < m; i++) {
    lara[i] = min(9, ss);
    ss -= min(9, ss);
  }
  for (int i = 0; i < m; i++) cout << ara[i];
  cout << " ";
  for (int i = 0; i < m; i++) {
    cout << lara[i];
  }
  return 0;
}

### Prompt

Develop a solution in Cpp to the problem described below:

You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.

Input

The single line of the input contains a pair of integers m, s (1 ≤ m ≤ 100, 0 ≤ s ≤ 900) — the length and the sum of the digits of the required numbers.

Output

In the output print the pair of the required non-negative integer numbers — first the minimum possible number, then — the maximum possible number. If no numbers satisfying conditions required exist, print the pair of numbers "-1 -1" (without the quotes).

Examples

Input

2 15


Output

69 96


Input

3 0


Output

-1 -1

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
class Timer {
  clock_t start;
  string name;

 public:
  Timer() {
    name = "";
    start = clock();
  }
  Timer(string s) {
    name = s;
    start = clock();
  }
  ~Timer() {
    fprintf(stderr, "%s: %.3gs\n", name.c_str(),
            1.0 * (clock() - start) / CLOCKS_PER_SEC);
  }
};
const double EPS = 1e-9;
const long double PI = acos(-1.0L);
template <typename dtype>
inline dtype sq(dtype a) {
  return a * a;
}
template <typename dtype1, typename dtype2>
inline pair<dtype1, dtype2> mp(dtype1 a, dtype2 b) {
  return make_pair(a, b);
}
template <typename dtype1, typename dtype2>
inline dtype1 safeMod(dtype1 a, dtype2 m) {
  return (a % m + m) % m;
}
template <typename dtype1, typename dtype2>
inline bool isEq(dtype1 a, dtype2 b) {
  return abs(a - b) < EPS;
}
template <typename dtype1, typename dtype2, typename dtype3>
inline bool isEq(dtype1 a, dtype2 b, dtype3 eps) {
  return abs(a - b) < eps;
}
template <typename dtype>
inline dtype toRad(dtype deg) {
  return deg * PI / 180.0;
}
template <typename dtype>
inline dtype toDeg(dtype rad) {
  return rad * 180.0 / PI;
}
template <typename dtype>
inline bool isKthBitOn(dtype n, int k) {
  assert(n <= numeric_limits<dtype>::max());
  assert(k <= numeric_limits<dtype>::digits);
  dtype ONE = 1;
  return bool((n & (ONE << k)));
}
template <typename dtype>
inline void setKthBit(dtype& n, int k) {
  assert(n <= numeric_limits<dtype>::max());
  assert(k <= numeric_limits<dtype>::digits);
  dtype ONE = 1;
  n = (n | (ONE << k));
}
const int oo = 0x3f3f3f3f;
const int MAX = 110;
const int MOD = 1000000007;
const int precision = 10;
int m, s;
int ara[MAX];
int lara[MAX];
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> m >> s;
  if (m * 9 < s || (s == 0 && m != 1)) {
    cout << "-1 -1";
    return 0;
  }
  if (m == 1) {
    cout << s << " " << s;
    return 0;
  }
  int ss = s - 1;
  for (int i = m - 1; i > 0; i--) {
    ara[i] = min(9, ss);
    ss -= min(9, ss);
  }
  ara[0] = max(1, ss + 1);
  ss = s;
  for (int i = 0; i < m; i++) {
    lara[i] = min(9, ss);
    ss -= min(9, ss);
  }
  for (int i = 0; i < m; i++) cout << ara[i];
  cout << " ";
  for (int i = 0; i < m; i++) {
    cout << lara[i];
  }
  return 0;
}

```