#include <bits/stdc++.h>
namespace sash {
using namespace std;
template <class T>
using v = vector<T>;
template <class T>
using vv = vector<v<T>>;
template <class T>
using pri = priority_queue<T>;
template <class T>
using rpi = priority_queue<T, v<T>, greater<T>>;
using vvb = v<vector<bool>>;
using vs = v<string>;
using vvi = v<vector<long long>>;
using vc = v<char>;
template <class T>
inline void rd(T& a) {
  cin >> a;
}
template <class T>
inline void rd(v<T>& a, long long n) {
  T x;
  for (long long i = (long long)0; i < (long long)n; i++) {
    cin >> x;
    a[i] = x;
  }
}
template <class T>
inline void rd(vv<T>& a, long long n, long long m) {
  for (long long i = (long long)0; i < (long long)n; i++) {
    rd(a[i], m);
  }
}
template <class T, class... Args>
inline void rd(T& a, Args&... args) {
  cin >> a;
  rd(args...);
}
template <class T>
inline void print(T a) {
  cout << (a) << '\n';
}
template <class T>
inline void print(v<T> a) {
  for (auto x : a) cout << (x) << ' ';
  cout << '\n';
}
template <class T>
inline void print(vv<T> a) {
  for (auto x : a) print(x);
}
inline long long mintwo(long long n) { return __builtin_ctzll(n); }
inline long long maxtwo(long long n) { return (long long)log2(n); }
inline long long onebits(long long n) { return __builtin_popcountll(n); }
inline long double pdiv(long long a, long long b) {
  return (1.0 * (a)) / (1.0 * (b));
}
inline void chxor(long long& a, long long b) { a = a ^ b; }
inline void mangekyo();
inline void subl() {}
long double _c;
using i32 = int32_t;
template <class T>
inline long long sum(v<T> a) {
  long long s = 0;
  for (auto x : a) s += x;
  return s;
}
template <class T>
inline T min(v<T> a) {
  return *min_element(a.begin(), a.end());
}
template <class T>
inline T max(v<T> a) {
  return *max_element(a.begin(), a.end());
}
template <class T, class U>
inline void chmax(T& a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void chmin(T& a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
inline T max(T a, U b) {
  return a > b ? a : b;
}
template <class T, class U>
inline T min(T a, U b) {
  return a < b ? a : b;
}
template <class T>
long long POW(T x, long long y, long long mod) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = (ans * 1ll * x) % mod;
    x = (x * 1ll * x) % mod;
    y >>= 1;
  }
  return ans;
}
template <class T>
v<T> pre_sum(v<T> a) {
  for (long long i = (long long)1; i < (long long)a.size(); i++)
    a[i] += a[i - 1];
  return a;
}
template <class T>
v<T> suf_sum(v<T> a) {
  for (long long i = (long long)a.size() - 1 - 1; i > (long long)0 - 1; i--)
    a[i] += a[i + 1];
  return a;
}
void factfill(vector<long long>& fact, long long n) {
  fact.resize(n + 1, 1);
  for (long long i = (long long)1; i < (long long)n + 1; i++)
    fact[i] = fact[i - 1] * i;
}
void yes() { print("YES"); }
void no() { print("NO"); }
const long long inf = 1e18, mod = 1e9 + 7;
}  // namespace sash
using namespace sash;
i32 main() {
  mangekyo();
  long long m, sum;
  rd(m, sum);
  long long i, j, k;
  if ((m > 1 && sum == 0) || sum > (9 * m)) {
    cout << "-1 -1";
    return 0;
  }
  for (i = m - 1, k = sum; i >= 0; i--) {
    j = max(0, k - 9 * i);
    if (j == 0 && i == m - 1 && k) j = 1;
    cout << j;
    k = k - j;
  }
  cout << " ";
  for (i = m - 1, k = sum; i >= 0; i--) {
    j = min(9, k);
    cout << j;
    k = k - j;
  }
  cerr << "Time: " << ((clock() - _c) / CLOCKS_PER_SEC);
  return 0;
}
void sash::mangekyo() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  srand(time(NULL));
  _c = clock();
}

### Prompt

Please create a solution in CPP to the following problem:

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>
namespace sash {
using namespace std;
template <class T>
using v = vector<T>;
template <class T>
using vv = vector<v<T>>;
template <class T>
using pri = priority_queue<T>;
template <class T>
using rpi = priority_queue<T, v<T>, greater<T>>;
using vvb = v<vector<bool>>;
using vs = v<string>;
using vvi = v<vector<long long>>;
using vc = v<char>;
template <class T>
inline void rd(T& a) {
  cin >> a;
}
template <class T>
inline void rd(v<T>& a, long long n) {
  T x;
  for (long long i = (long long)0; i < (long long)n; i++) {
    cin >> x;
    a[i] = x;
  }
}
template <class T>
inline void rd(vv<T>& a, long long n, long long m) {
  for (long long i = (long long)0; i < (long long)n; i++) {
    rd(a[i], m);
  }
}
template <class T, class... Args>
inline void rd(T& a, Args&... args) {
  cin >> a;
  rd(args...);
}
template <class T>
inline void print(T a) {
  cout << (a) << '\n';
}
template <class T>
inline void print(v<T> a) {
  for (auto x : a) cout << (x) << ' ';
  cout << '\n';
}
template <class T>
inline void print(vv<T> a) {
  for (auto x : a) print(x);
}
inline long long mintwo(long long n) { return __builtin_ctzll(n); }
inline long long maxtwo(long long n) { return (long long)log2(n); }
inline long long onebits(long long n) { return __builtin_popcountll(n); }
inline long double pdiv(long long a, long long b) {
  return (1.0 * (a)) / (1.0 * (b));
}
inline void chxor(long long& a, long long b) { a = a ^ b; }
inline void mangekyo();
inline void subl() {}
long double _c;
using i32 = int32_t;
template <class T>
inline long long sum(v<T> a) {
  long long s = 0;
  for (auto x : a) s += x;
  return s;
}
template <class T>
inline T min(v<T> a) {
  return *min_element(a.begin(), a.end());
}
template <class T>
inline T max(v<T> a) {
  return *max_element(a.begin(), a.end());
}
template <class T, class U>
inline void chmax(T& a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void chmin(T& a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
inline T max(T a, U b) {
  return a > b ? a : b;
}
template <class T, class U>
inline T min(T a, U b) {
  return a < b ? a : b;
}
template <class T>
long long POW(T x, long long y, long long mod) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = (ans * 1ll * x) % mod;
    x = (x * 1ll * x) % mod;
    y >>= 1;
  }
  return ans;
}
template <class T>
v<T> pre_sum(v<T> a) {
  for (long long i = (long long)1; i < (long long)a.size(); i++)
    a[i] += a[i - 1];
  return a;
}
template <class T>
v<T> suf_sum(v<T> a) {
  for (long long i = (long long)a.size() - 1 - 1; i > (long long)0 - 1; i--)
    a[i] += a[i + 1];
  return a;
}
void factfill(vector<long long>& fact, long long n) {
  fact.resize(n + 1, 1);
  for (long long i = (long long)1; i < (long long)n + 1; i++)
    fact[i] = fact[i - 1] * i;
}
void yes() { print("YES"); }
void no() { print("NO"); }
const long long inf = 1e18, mod = 1e9 + 7;
}  // namespace sash
using namespace sash;
i32 main() {
  mangekyo();
  long long m, sum;
  rd(m, sum);
  long long i, j, k;
  if ((m > 1 && sum == 0) || sum > (9 * m)) {
    cout << "-1 -1";
    return 0;
  }
  for (i = m - 1, k = sum; i >= 0; i--) {
    j = max(0, k - 9 * i);
    if (j == 0 && i == m - 1 && k) j = 1;
    cout << j;
    k = k - j;
  }
  cout << " ";
  for (i = m - 1, k = sum; i >= 0; i--) {
    j = min(9, k);
    cout << j;
    k = k - j;
  }
  cerr << "Time: " << ((clock() - _c) / CLOCKS_PER_SEC);
  return 0;
}
void sash::mangekyo() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  srand(time(NULL));
  _c = clock();
}

```