#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T sqr(T x) {
  return x * x;
}
const double eps = 1e-8;
const double pi = acos(-1.);
const int inf = 1e9 + 7;
const int N = 3e5 + 20;
int n, m, h;
int main() {
  uint64_t a, b;
  cin >> a >> b;
  auto sum = a;
  if (a < b) {
    cout << -1;
    return 0;
  }
  a -= b;
  if (a & 1) {
    cout << -1;
    return 0;
  }
  a /= 2;
  cout << a << " " << sum - a << '\n';
}
