#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
void pPRINT(std::ostream& ost) {}
template <class T, class... U>
void pPRINT(std::ostream& ost, const T t, const U... u) {
  ost << t << " ";
  pPRINT(ost, u...);
}
template <class... T>
void PRINT(const T... t) {
  pPRINT(std::cout, t...);
}
template <class... T>
void PRINTl(const T... t) {
  pPRINT(std::cout, t...);
  std::cout << "\n";
}
template <class T>
void PRINTa(const T* const t, const ll size) {
  for (int i = 0; i < size; i++) PRINT(t[i]);
  PRINTl();
}
template <class T>
void PRINTal(const T* const t, const ll size) {
  for (int i = 0; i < size; i++) PRINTl(i, ":", t[i]);
}
void init() {}
void solve();
int main(int argc, char* argv[]) {
  ;
  init();
  solve();
  return 0;
}
void solve() {
  ;
  ll a, b;
  cin >> a >> b;
  if (a > 9 || b > 9)
    PRINT(-1);
  else
    PRINT(a, b);
  return;
}
