#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
const unsigned long long int N = 100005;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    unsigned long long int i, j, k, n, m, ans = 0, cnt = 0, sum = 0, a, b;
    cin >> a >> b;
    if (a < b)
      cout << -1;
    else {
      unsigned long long int d = a - b;
      if (d % 2)
        cout << -1;
      else {
        d /= 2;
        if (b & d)
          cout << -1;
        else
          cout << d << ' ' << d + b;
      }
    }
  }
  return 0;
}
