#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
unsigned long long A, B;
int main() {
  cin >> A >> B;
  if (A < B) {
    cout << -1 << endl;
  } else {
    unsigned long long v = A - B;
    if (v % 2) {
      cout << -1 << endl;
    } else {
      v /= 2;
      if (B & v) {
        cout << -1 << endl;
      } else {
        cout << v << ' ' << v + B << endl;
      }
    }
  }
  return 0;
}
