#include <bits/stdc++.h>
using namespace std;
int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
long long getLongLong() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
double getDouble() {
  double x;
  scanf("%lf", &x);
  return x;
}
char getChar() {
  char x;
  scanf("%c", &x);
  return x;
}
template <typename t>
t abs(t a) {
  if (a >= 0) return a;
  return -a;
}
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream second(s);
  string x;
  while (getline(second, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << "  ";
  err(++it, args...);
}
void FastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
char get(int& n) {
  if (n >= 9) {
    n -= 9;
    return '9';
  }
  int x = n;
  n -= n;
  return x + '0';
}
int main() {
  int n = getInt();
  int num = getInt();
  if (num == 0) {
    if (n > 1)
      printf("-1 -1\n");
    else
      printf("0 0\n");
    return 0;
  }
  int yes = 1;
  string mn, mx;
  for (int i = 0; i < n; i++) {
    mx += get(num);
  }
  if (num > 0) {
    printf("-1 -1\n");
    return 0;
  }
  mn = mx;
  reverse(mn.begin(), mn.end());
  if (mn[0] == '0')
    for (int i = 0; i < mn.size(); i++)
      if (mn[i] > '0') {
        mn[i]--;
        mn[0]++;
        break;
      }
  cout << mn << " " << mx << endl;
  return 0;
}

### Prompt

Your task is to create 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;
int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
long long getLongLong() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
double getDouble() {
  double x;
  scanf("%lf", &x);
  return x;
}
char getChar() {
  char x;
  scanf("%c", &x);
  return x;
}
template <typename t>
t abs(t a) {
  if (a >= 0) return a;
  return -a;
}
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream second(s);
  string x;
  while (getline(second, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << "  ";
  err(++it, args...);
}
void FastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
char get(int& n) {
  if (n >= 9) {
    n -= 9;
    return '9';
  }
  int x = n;
  n -= n;
  return x + '0';
}
int main() {
  int n = getInt();
  int num = getInt();
  if (num == 0) {
    if (n > 1)
      printf("-1 -1\n");
    else
      printf("0 0\n");
    return 0;
  }
  int yes = 1;
  string mn, mx;
  for (int i = 0; i < n; i++) {
    mx += get(num);
  }
  if (num > 0) {
    printf("-1 -1\n");
    return 0;
  }
  mn = mx;
  reverse(mn.begin(), mn.end());
  if (mn[0] == '0')
    for (int i = 0; i < mn.size(); i++)
      if (mn[i] > '0') {
        mn[i]--;
        mn[0]++;
        break;
      }
  cout << mn << " " << mx << endl;
  return 0;
}

```