#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int num[a], num2[a];
  int l = 9, h = 9, p = 0, b2, i = a - 1;
  b2 = b - 1;
  int b1 = b;
  for (int s = 0; s < a; s++) num[s] = 0;
  for (int ssss = 0; ssss < a; ssss++) num2[ssss] = 0;
  if ((b <= a * 9) && (b > 0 && a > 0)) {
    while (b2 > 0) {
      if (b2 >= l) {
        b2 -= l;
        num[i] = l;
        i--;
      } else if (b2 < l) {
        l--;
      }
    }
    while (b1 > 0) {
      if (b1 >= h) {
        b1 -= h;
        num2[p] = h;
        p++;
      } else if (b1 < h) {
        h--;
      }
    }
    num[0] += 1;
    for (int ss = 0; ss < a; ss++) {
      cout << num[ss];
    }
    cout << endl;
    for (int sss = 0; sss < a; sss++) {
      cout << num2[sss];
    }
  } else if (a == 1 && b == 0)
    cout << "0 0";
  else
    cout << "-1 -1";
}

### 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>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int num[a], num2[a];
  int l = 9, h = 9, p = 0, b2, i = a - 1;
  b2 = b - 1;
  int b1 = b;
  for (int s = 0; s < a; s++) num[s] = 0;
  for (int ssss = 0; ssss < a; ssss++) num2[ssss] = 0;
  if ((b <= a * 9) && (b > 0 && a > 0)) {
    while (b2 > 0) {
      if (b2 >= l) {
        b2 -= l;
        num[i] = l;
        i--;
      } else if (b2 < l) {
        l--;
      }
    }
    while (b1 > 0) {
      if (b1 >= h) {
        b1 -= h;
        num2[p] = h;
        p++;
      } else if (b1 < h) {
        h--;
      }
    }
    num[0] += 1;
    for (int ss = 0; ss < a; ss++) {
      cout << num[ss];
    }
    cout << endl;
    for (int sss = 0; sss < a; sss++) {
      cout << num2[sss];
    }
  } else if (a == 1 && b == 0)
    cout << "0 0";
  else
    cout << "-1 -1";
}

```