#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int m, s;
  cin >> m >> s;
  string mins(m, '0');
  mins[0] = '1';
  string maxs(m, '0');
  long long int sum = s - 1;
  if (s == 0 && m == 1) {
    cout << "0 0" << endl;
  } else if (s == 1) {
    string minss(m, '0');
    string maxss(m, '0');
    minss[0] = '1';
    maxss[0] = '1';
    cout << minss << " " << maxss << endl;
  } else if (m * 9 < s || s == 0) {
    cout << "-1 -1" << endl;
  } else {
    for (int i = m - 1; i >= 0; i--) {
      sum = sum - 9;
      if (sum > 0) {
        mins[i] = mins[i] + 9;
      } else {
        sum = sum + 9;
        mins[i] = mins[i] + sum;
        break;
      }
    }
    for (int i = 0; i < m; i++) {
      s = s - 9;
      if (s >= 0) {
        maxs[i] = maxs[i] + 9;
      } else {
        s = s + 9;
        maxs[i] = maxs[i] + s;
        break;
      }
    }
    cout << mins << " " << maxs << endl;
  }
}

### Prompt

Please formulate a CPP solution 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>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int m, s;
  cin >> m >> s;
  string mins(m, '0');
  mins[0] = '1';
  string maxs(m, '0');
  long long int sum = s - 1;
  if (s == 0 && m == 1) {
    cout << "0 0" << endl;
  } else if (s == 1) {
    string minss(m, '0');
    string maxss(m, '0');
    minss[0] = '1';
    maxss[0] = '1';
    cout << minss << " " << maxss << endl;
  } else if (m * 9 < s || s == 0) {
    cout << "-1 -1" << endl;
  } else {
    for (int i = m - 1; i >= 0; i--) {
      sum = sum - 9;
      if (sum > 0) {
        mins[i] = mins[i] + 9;
      } else {
        sum = sum + 9;
        mins[i] = mins[i] + sum;
        break;
      }
    }
    for (int i = 0; i < m; i++) {
      s = s - 9;
      if (s >= 0) {
        maxs[i] = maxs[i] + 9;
      } else {
        s = s + 9;
        maxs[i] = maxs[i] + s;
        break;
      }
    }
    cout << mins << " " << maxs << endl;
  }
}

```