#include <bits/stdc++.h>
using namespace std;
vector<long long> QuickSort(vector<long long> arr) {
  if (arr.size() > 1) {
    long long pivot = arr[0];
    vector<long long> less, more, equal;
    for (int i = 0; i < arr.size(); i++) {
      if (arr[i] > pivot) {
        more.push_back(arr[i]);
      } else if (arr[i] < pivot) {
        less.push_back(arr[i]);
      } else {
        equal.push_back(arr[i]);
      }
    }
    less = QuickSort(less);
    more = QuickSort(more);
    for (int i = 0; i < equal.size(); i++) {
      less.push_back(equal[i]);
    }
    for (int i = 0; i < more.size(); i++) {
      less.push_back(more[i]);
    }
    return less;
  } else {
    return arr;
  }
}
vector<long long> ReverseVector(vector<long long> arr) {
  long long buf;
  for (int i = 0; i < arr.size() / 2; i++) {
    buf = arr[i];
    arr[i] = arr[arr.size() - 1 - i];
    arr[arr.size() - 1 - i] = buf;
  }
  return arr;
}
long long Max(long long fst, long long scd) {
  if (fst >= scd) {
    return fst;
  } else {
    return scd;
  }
}
long long Min(long long fst, long long scd) {
  if (fst > scd) {
    return scd;
  } else {
    return fst;
  }
}
long long MinVector(vector<long long> arr) {
  long long min = arr[0];
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] < min) {
      min = arr[i];
    }
  }
  return min;
}
double MaxVector(vector<double> arr) {
  double max = arr[0];
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] > max) {
      max = arr[i];
    }
  }
  return max;
}
long long IndexVector(vector<long long> arr, long long num) {
  for (long long i = 0; i < arr.size(); i++) {
    if (arr[i] == num) {
      return i;
    }
  }
  return -1;
}
void RangeVector(vector<vector<bool>>& arr, vector<int>& queue, int start,
                 int end, int count) {
  for (int x = 0; x < count; x++) {
    if (arr[start][x] == 1) {
      if (queue[x] != -1) {
        queue[x] = Min(queue[x], queue[start] + 1);
      } else {
        queue[x] = queue[start] + 1;
      }
    }
  }
  for (int x = 0; x < count; x++) {
    if (arr[start][x] == 1) {
      arr[start][x] = 0;
      arr[x][start] = 0;
      RangeVector(arr, queue, x, end, count);
    }
  }
}
void RangeSquareVector() {
  int count, start, end, buf;
  vector<int> queue;
  vector<bool> subarr;
  vector<vector<bool>> arr;
  cin >> count >> start >> end;
  start--;
  end--;
  for (int y = 0; y < count; y++) {
    queue.push_back(-1);
    for (int x = 0; x < count; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
    subarr.clear();
  }
  queue[start] = 0;
  RangeVector(arr, queue, start, end, count);
  if (queue[end] == -1) {
    cout << 0 << endl;
  } else {
    cout << queue[end] << endl;
  }
}
string Int10xTo2x(long long ten) {
  string ans;
  long long i = 1;
  while (pow(2, i) <= ten) {
    i++;
  }
  for (long long k = i - 1; k >= 0; k--) {
    if (pow(2, k) <= ten) {
      ans += '1';
      ten -= pow(2, k);
    } else {
      ans += '0';
    }
  }
  return ans;
}
long long Int2xTo10x(string two) {
  long long ans = 0;
  for (long long i = 0; i < two.length(); i++) {
    if (two[i] == '1') {
      ans += pow(2, two.length() - i - 1);
    }
  }
  return ans;
}
string Xor(string a, string b) {
  string ans;
  if (a.length() > b.length()) {
    int aminb = a.length() - b.length();
    for (int i = 0; i < aminb; i++) {
      ans += a[0];
      a.erase(0);
    }
  }
  for (int i = 0; i < b.length(); i++) {
    if (b[i] == '1') {
      if (b.length() - a.length() > i) {
        ans += '1';
      } else if (a[i - (b.length() - a.length())] == '1') {
        ans += '0';
      } else {
        ans += '1';
      }
    } else {
      if (b.length() - a.length() > i) {
        ans += '0';
      } else {
        ans += a[i - (b.length() - a.length())];
      }
    }
  }
  return ans;
}
long long CountSubvectors(vector<vector<bool>> arr) {
  int ans = 0;
  vector<bool> used(arr.size(), 0);
  for (int i = 0; i < arr.size(); ++i) {
    if (used[i]) {
      continue;
    }
    ans++;
    queue<int> q;
    q.push(i);
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int j = 0; j < arr.size(); ++j) {
        if (!used[j] && arr[v][j]) {
          used[j] = 1;
          q.push(j);
        }
      }
    }
  }
  return ans;
}
void InputBoolMatrix(vector<vector<bool>>& arr, long long siz) {
  bool buf;
  vector<bool> subarr;
  for (int y = 0; y < siz; y++) {
    subarr.clear();
    for (int x = 0; x < siz; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
  }
}
bool IsDoubleVector(vector<vector<bool>> arr) {
  bool ans = 1;
  long long y1 = -1;
  for (int y = 0; y < arr.size(); y++) {
    for (int x = 0; x < arr.size(); x++) {
      if (arr[y][x] == 1) {
        y1 = x;
        break;
      }
    }
    if (y1 != -1) {
      break;
    }
  }
  vector<long long> yx = {y1}, newyx;
  vector<bool> used(arr.size(), 0);
  used[yx[0]] = 1;
  short color = 2;
  vector<short> colors(arr.size(), 0);
  colors[yx[0]] = color;
  while (!yx.empty()) {
    if (color == 2) {
      color = 3;
    } else {
      color = 2;
    }
    for (auto y : yx) {
      for (int x = 0; x < arr.size(); x++) {
        if (arr[y][x] == 1) {
          if (!used[x]) {
            colors[x] = color;
            used[x] = 1;
            newyx.push_back(x);
          }
          if (colors[x] == colors[y]) {
            ans = 0;
          }
        }
      }
    }
    yx.clear();
    for (auto s : newyx) {
      yx.push_back(s);
    }
    newyx.clear();
  }
  return ans;
}
long long CountElementsDFS(vector<vector<bool>> arr, long long y1,
                           vector<bool>& used, long long& ans) {
  long long a = 1;
  for (int x = 0; x < arr.size(); x++) {
    if (arr[y1][x] == 1 && !used[x]) {
      used[x] = 1;
      a += CountElementsDFS(arr, x, used, ans);
    }
  }
  return a;
}
long long IndexRightVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size();
  while (left < right - 1) {
    long long middle = (right + left) / 2;
    if (num < arr[middle]) {
      right = middle;
    } else {
      left = middle;
    }
  }
  if (arr[left] == num) {
    return left;
  } else {
    return -1;
  }
}
long long IndexLeftVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size();
  while (left < right) {
    long long middle = (right + left) / 2;
    if (num > arr[middle]) {
      left = middle + 1;
    } else {
      right = middle;
    }
  }
  if (arr[right] == num) {
    return right;
  } else {
    return -1;
  }
}
long long IndexNearVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size() - 1;
  while (right - left > 1) {
    long long middle = (left + right) / 2;
    if (num > arr[middle]) {
      left = middle;
    } else if (num < arr[middle]) {
      right = middle;
    } else {
      return middle;
    }
  }
  if (abs(num - arr[left]) > abs(num - arr[right])) {
    return right;
  } else {
    return left;
  }
}
void VectorCycle(vector<vector<bool>> arr, long long now, vector<bool>& used,
                 vector<long long> history, bool& isend) {
  for (long long x = 0; x < arr.size(); x++) {
    if (isend == 1) {
      return;
    }
    if (arr[now][x] == 1 && !used[x]) {
      used[x] = 1;
      history.push_back(now);
      VectorCycle(arr, x, used, history, isend);
    } else if (arr[now][x] == 1 && used[x]) {
      bool iscycle = 0;
      for (int i = 0; i < arr.size() && !iscycle; i++) {
        if (arr[x][i] == 1) {
          for (auto s : history) {
            if (s == x) {
              iscycle = 1;
              break;
            }
          }
        }
      }
      if (iscycle) {
        bool startcout = 0;
        int j = 0;
        while (history[j] != x) {
          j++;
        }
        cout << "YES" << endl;
        for (int i = j; i < history.size(); i++) {
          cout << history[i] + 1 << " ";
        }
        cout << now + 1;
        isend = 1;
      }
    }
  }
}
long long FindString(string main, string sub) {
  for (int i = 0; i < main.size(); i++) {
    if (main[i] == sub[0] && main.size() - i >= sub.size()) {
      bool finded = 1;
      for (int k = 0; k < sub.size(); k++) {
        if (main[i + k] != sub[k]) {
          finded = 0;
          break;
        }
      }
      if (finded) {
        return i;
      }
    }
  }
  return -1;
}
void ReplaceAll(string& str, const string& from, const string& to) {
  if (from.empty()) return;
  size_t start_pos = 0;
  while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
    str.replace(start_pos, from.length(), to);
    start_pos += to.length();
  }
}
vector<string> Split(string str, char sim) {
  vector<string> ans;
  string word = "";
  for (auto s : str) {
    if (s != sim) {
      word += s;
    } else {
      if (word == "") {
        ans.push_back("256");
      } else {
        ans.push_back(word);
      }
      word = "";
    }
  }
  if (word.length() != 0) {
    ans.push_back(word);
  }
  return ans;
}
void InputLongLongMatrix(vector<vector<long long>>& arr, long long siz) {
  long long buf;
  vector<long long> bufarr;
  for (long long i = 0; i < siz; i++) {
    bufarr.clear();
    for (long long k = 0; k < siz; k++) {
      cin >> buf;
      bufarr.push_back(buf);
    }
    arr.push_back(bufarr);
  }
}
long long RangeWeightVector(vector<vector<long long>> arr, long long start,
                            long long end) {
  long long count = arr.size();
  vector<long long> dlen(count, pow(10, 10));
  dlen[start] = 0;
  vector<bool> used(count, 0);
  long long min_dist = 0;
  long long min_dist_index = start;
  for (int i = 0; i < count; i++) {
    for (int j = 0; j < count; j++) {
      if (arr[i][j] == -1) {
        arr[i][j] = pow(10, 10);
      }
    }
  }
  while (min_dist < pow(10, 10)) {
    long long i = min_dist_index;
    used[i] = 1;
    for (long long j = 0; j < count; j++) {
      if (dlen[i] + arr[i][j] < dlen[j]) {
        dlen[j] = dlen[i] + arr[i][j];
      }
    }
    min_dist = pow(10, 10);
    for (long long j = 0; j < count; j++) {
      if (!used[j] && dlen[j] < min_dist) {
        min_dist = dlen[j];
        min_dist_index = j;
      }
    }
  }
  for (long long i = 0; i < count; i++) {
    if (dlen[i] == pow(10, 10)) {
      dlen[i] = -1;
    }
  }
  return (dlen[end]);
}
void InputWeightVector(vector<vector<long long>>& arr, long long siz) {
  long long buf;
  vector<long long> subarr;
  for (int i = 0; i < siz; i++) {
    subarr.clear();
    for (int x = 0; x < siz; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
  }
}
void MinRangeVector(vector<vector<long long>>& arr) {
  long long siz = arr.size();
  for (int k = 0; k < siz; k++) {
    for (int i = 0; i < siz; i++) {
      for (int j = 0; j < siz; j++) {
        arr[i][j] = min(arr[i][j], arr[i][k] + arr[k][j]);
      }
    }
  }
}
int main() {
  string a, b;
  cin >> a >> b;
  if (atoi(b.c_str()) == 0 && atoi(a.c_str()) == 0) {
    cout << -1;
  } else if (atoi(b.c_str()) - atoi(a.c_str()) == 0) {
    cout << a << "0 " << b << "1";
  } else if (atoi(b.c_str()) - atoi(a.c_str()) == 1) {
    cout << a << " " << b;
  } else if (atoi(b.c_str()) == 1 && atoi(a.c_str()) == 9) {
    cout << "99 100";
  } else {
    cout << -1;
  }
  return 0;
}

### Prompt

Generate a cpp solution to the following problem:

Kolya is very absent-minded. Today his math teacher asked him to solve a simple problem with the equation a + 1 = b with positive integers a and b, but Kolya forgot the numbers a and b. He does, however, remember that the first (leftmost) digit of a was d_a, and the first (leftmost) digit of b was d_b.

Can you reconstruct any equation a + 1 = b that satisfies this property? It may be possible that Kolya misremembers the digits, and there is no suitable equation, in which case report so.

Input

The only line contains two space-separated digits d_a and d_b (1 ≤ d_a, d_b ≤ 9).

Output

If there is no equation a + 1 = b with positive integers a and b such that the first digit of a is d_a, and the first digit of b is d_b, print a single number -1.

Otherwise, print any suitable a and b that both are positive and do not exceed 10^9. It is guaranteed that if a solution exists, there also exists a solution with both numbers not exceeding 10^9.

Examples

Input


1 2


Output


199 200


Input


4 4


Output


412 413


Input


5 7


Output


-1


Input


6 2


Output


-1

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
vector<long long> QuickSort(vector<long long> arr) {
  if (arr.size() > 1) {
    long long pivot = arr[0];
    vector<long long> less, more, equal;
    for (int i = 0; i < arr.size(); i++) {
      if (arr[i] > pivot) {
        more.push_back(arr[i]);
      } else if (arr[i] < pivot) {
        less.push_back(arr[i]);
      } else {
        equal.push_back(arr[i]);
      }
    }
    less = QuickSort(less);
    more = QuickSort(more);
    for (int i = 0; i < equal.size(); i++) {
      less.push_back(equal[i]);
    }
    for (int i = 0; i < more.size(); i++) {
      less.push_back(more[i]);
    }
    return less;
  } else {
    return arr;
  }
}
vector<long long> ReverseVector(vector<long long> arr) {
  long long buf;
  for (int i = 0; i < arr.size() / 2; i++) {
    buf = arr[i];
    arr[i] = arr[arr.size() - 1 - i];
    arr[arr.size() - 1 - i] = buf;
  }
  return arr;
}
long long Max(long long fst, long long scd) {
  if (fst >= scd) {
    return fst;
  } else {
    return scd;
  }
}
long long Min(long long fst, long long scd) {
  if (fst > scd) {
    return scd;
  } else {
    return fst;
  }
}
long long MinVector(vector<long long> arr) {
  long long min = arr[0];
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] < min) {
      min = arr[i];
    }
  }
  return min;
}
double MaxVector(vector<double> arr) {
  double max = arr[0];
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] > max) {
      max = arr[i];
    }
  }
  return max;
}
long long IndexVector(vector<long long> arr, long long num) {
  for (long long i = 0; i < arr.size(); i++) {
    if (arr[i] == num) {
      return i;
    }
  }
  return -1;
}
void RangeVector(vector<vector<bool>>& arr, vector<int>& queue, int start,
                 int end, int count) {
  for (int x = 0; x < count; x++) {
    if (arr[start][x] == 1) {
      if (queue[x] != -1) {
        queue[x] = Min(queue[x], queue[start] + 1);
      } else {
        queue[x] = queue[start] + 1;
      }
    }
  }
  for (int x = 0; x < count; x++) {
    if (arr[start][x] == 1) {
      arr[start][x] = 0;
      arr[x][start] = 0;
      RangeVector(arr, queue, x, end, count);
    }
  }
}
void RangeSquareVector() {
  int count, start, end, buf;
  vector<int> queue;
  vector<bool> subarr;
  vector<vector<bool>> arr;
  cin >> count >> start >> end;
  start--;
  end--;
  for (int y = 0; y < count; y++) {
    queue.push_back(-1);
    for (int x = 0; x < count; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
    subarr.clear();
  }
  queue[start] = 0;
  RangeVector(arr, queue, start, end, count);
  if (queue[end] == -1) {
    cout << 0 << endl;
  } else {
    cout << queue[end] << endl;
  }
}
string Int10xTo2x(long long ten) {
  string ans;
  long long i = 1;
  while (pow(2, i) <= ten) {
    i++;
  }
  for (long long k = i - 1; k >= 0; k--) {
    if (pow(2, k) <= ten) {
      ans += '1';
      ten -= pow(2, k);
    } else {
      ans += '0';
    }
  }
  return ans;
}
long long Int2xTo10x(string two) {
  long long ans = 0;
  for (long long i = 0; i < two.length(); i++) {
    if (two[i] == '1') {
      ans += pow(2, two.length() - i - 1);
    }
  }
  return ans;
}
string Xor(string a, string b) {
  string ans;
  if (a.length() > b.length()) {
    int aminb = a.length() - b.length();
    for (int i = 0; i < aminb; i++) {
      ans += a[0];
      a.erase(0);
    }
  }
  for (int i = 0; i < b.length(); i++) {
    if (b[i] == '1') {
      if (b.length() - a.length() > i) {
        ans += '1';
      } else if (a[i - (b.length() - a.length())] == '1') {
        ans += '0';
      } else {
        ans += '1';
      }
    } else {
      if (b.length() - a.length() > i) {
        ans += '0';
      } else {
        ans += a[i - (b.length() - a.length())];
      }
    }
  }
  return ans;
}
long long CountSubvectors(vector<vector<bool>> arr) {
  int ans = 0;
  vector<bool> used(arr.size(), 0);
  for (int i = 0; i < arr.size(); ++i) {
    if (used[i]) {
      continue;
    }
    ans++;
    queue<int> q;
    q.push(i);
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int j = 0; j < arr.size(); ++j) {
        if (!used[j] && arr[v][j]) {
          used[j] = 1;
          q.push(j);
        }
      }
    }
  }
  return ans;
}
void InputBoolMatrix(vector<vector<bool>>& arr, long long siz) {
  bool buf;
  vector<bool> subarr;
  for (int y = 0; y < siz; y++) {
    subarr.clear();
    for (int x = 0; x < siz; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
  }
}
bool IsDoubleVector(vector<vector<bool>> arr) {
  bool ans = 1;
  long long y1 = -1;
  for (int y = 0; y < arr.size(); y++) {
    for (int x = 0; x < arr.size(); x++) {
      if (arr[y][x] == 1) {
        y1 = x;
        break;
      }
    }
    if (y1 != -1) {
      break;
    }
  }
  vector<long long> yx = {y1}, newyx;
  vector<bool> used(arr.size(), 0);
  used[yx[0]] = 1;
  short color = 2;
  vector<short> colors(arr.size(), 0);
  colors[yx[0]] = color;
  while (!yx.empty()) {
    if (color == 2) {
      color = 3;
    } else {
      color = 2;
    }
    for (auto y : yx) {
      for (int x = 0; x < arr.size(); x++) {
        if (arr[y][x] == 1) {
          if (!used[x]) {
            colors[x] = color;
            used[x] = 1;
            newyx.push_back(x);
          }
          if (colors[x] == colors[y]) {
            ans = 0;
          }
        }
      }
    }
    yx.clear();
    for (auto s : newyx) {
      yx.push_back(s);
    }
    newyx.clear();
  }
  return ans;
}
long long CountElementsDFS(vector<vector<bool>> arr, long long y1,
                           vector<bool>& used, long long& ans) {
  long long a = 1;
  for (int x = 0; x < arr.size(); x++) {
    if (arr[y1][x] == 1 && !used[x]) {
      used[x] = 1;
      a += CountElementsDFS(arr, x, used, ans);
    }
  }
  return a;
}
long long IndexRightVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size();
  while (left < right - 1) {
    long long middle = (right + left) / 2;
    if (num < arr[middle]) {
      right = middle;
    } else {
      left = middle;
    }
  }
  if (arr[left] == num) {
    return left;
  } else {
    return -1;
  }
}
long long IndexLeftVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size();
  while (left < right) {
    long long middle = (right + left) / 2;
    if (num > arr[middle]) {
      left = middle + 1;
    } else {
      right = middle;
    }
  }
  if (arr[right] == num) {
    return right;
  } else {
    return -1;
  }
}
long long IndexNearVector(vector<long long> arr, long long num) {
  long long left = 0, right = arr.size() - 1;
  while (right - left > 1) {
    long long middle = (left + right) / 2;
    if (num > arr[middle]) {
      left = middle;
    } else if (num < arr[middle]) {
      right = middle;
    } else {
      return middle;
    }
  }
  if (abs(num - arr[left]) > abs(num - arr[right])) {
    return right;
  } else {
    return left;
  }
}
void VectorCycle(vector<vector<bool>> arr, long long now, vector<bool>& used,
                 vector<long long> history, bool& isend) {
  for (long long x = 0; x < arr.size(); x++) {
    if (isend == 1) {
      return;
    }
    if (arr[now][x] == 1 && !used[x]) {
      used[x] = 1;
      history.push_back(now);
      VectorCycle(arr, x, used, history, isend);
    } else if (arr[now][x] == 1 && used[x]) {
      bool iscycle = 0;
      for (int i = 0; i < arr.size() && !iscycle; i++) {
        if (arr[x][i] == 1) {
          for (auto s : history) {
            if (s == x) {
              iscycle = 1;
              break;
            }
          }
        }
      }
      if (iscycle) {
        bool startcout = 0;
        int j = 0;
        while (history[j] != x) {
          j++;
        }
        cout << "YES" << endl;
        for (int i = j; i < history.size(); i++) {
          cout << history[i] + 1 << " ";
        }
        cout << now + 1;
        isend = 1;
      }
    }
  }
}
long long FindString(string main, string sub) {
  for (int i = 0; i < main.size(); i++) {
    if (main[i] == sub[0] && main.size() - i >= sub.size()) {
      bool finded = 1;
      for (int k = 0; k < sub.size(); k++) {
        if (main[i + k] != sub[k]) {
          finded = 0;
          break;
        }
      }
      if (finded) {
        return i;
      }
    }
  }
  return -1;
}
void ReplaceAll(string& str, const string& from, const string& to) {
  if (from.empty()) return;
  size_t start_pos = 0;
  while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
    str.replace(start_pos, from.length(), to);
    start_pos += to.length();
  }
}
vector<string> Split(string str, char sim) {
  vector<string> ans;
  string word = "";
  for (auto s : str) {
    if (s != sim) {
      word += s;
    } else {
      if (word == "") {
        ans.push_back("256");
      } else {
        ans.push_back(word);
      }
      word = "";
    }
  }
  if (word.length() != 0) {
    ans.push_back(word);
  }
  return ans;
}
void InputLongLongMatrix(vector<vector<long long>>& arr, long long siz) {
  long long buf;
  vector<long long> bufarr;
  for (long long i = 0; i < siz; i++) {
    bufarr.clear();
    for (long long k = 0; k < siz; k++) {
      cin >> buf;
      bufarr.push_back(buf);
    }
    arr.push_back(bufarr);
  }
}
long long RangeWeightVector(vector<vector<long long>> arr, long long start,
                            long long end) {
  long long count = arr.size();
  vector<long long> dlen(count, pow(10, 10));
  dlen[start] = 0;
  vector<bool> used(count, 0);
  long long min_dist = 0;
  long long min_dist_index = start;
  for (int i = 0; i < count; i++) {
    for (int j = 0; j < count; j++) {
      if (arr[i][j] == -1) {
        arr[i][j] = pow(10, 10);
      }
    }
  }
  while (min_dist < pow(10, 10)) {
    long long i = min_dist_index;
    used[i] = 1;
    for (long long j = 0; j < count; j++) {
      if (dlen[i] + arr[i][j] < dlen[j]) {
        dlen[j] = dlen[i] + arr[i][j];
      }
    }
    min_dist = pow(10, 10);
    for (long long j = 0; j < count; j++) {
      if (!used[j] && dlen[j] < min_dist) {
        min_dist = dlen[j];
        min_dist_index = j;
      }
    }
  }
  for (long long i = 0; i < count; i++) {
    if (dlen[i] == pow(10, 10)) {
      dlen[i] = -1;
    }
  }
  return (dlen[end]);
}
void InputWeightVector(vector<vector<long long>>& arr, long long siz) {
  long long buf;
  vector<long long> subarr;
  for (int i = 0; i < siz; i++) {
    subarr.clear();
    for (int x = 0; x < siz; x++) {
      cin >> buf;
      subarr.push_back(buf);
    }
    arr.push_back(subarr);
  }
}
void MinRangeVector(vector<vector<long long>>& arr) {
  long long siz = arr.size();
  for (int k = 0; k < siz; k++) {
    for (int i = 0; i < siz; i++) {
      for (int j = 0; j < siz; j++) {
        arr[i][j] = min(arr[i][j], arr[i][k] + arr[k][j]);
      }
    }
  }
}
int main() {
  string a, b;
  cin >> a >> b;
  if (atoi(b.c_str()) == 0 && atoi(a.c_str()) == 0) {
    cout << -1;
  } else if (atoi(b.c_str()) - atoi(a.c_str()) == 0) {
    cout << a << "0 " << b << "1";
  } else if (atoi(b.c_str()) - atoi(a.c_str()) == 1) {
    cout << a << " " << b;
  } else if (atoi(b.c_str()) == 1 && atoi(a.c_str()) == 9) {
    cout << "99 100";
  } else {
    cout << -1;
  }
  return 0;
}

```