#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long INFll = 1000000000000000000ll;
const long double EPS = 1e-13;
const int MOD = 1000000007;
const int N = 2016;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  unsigned long long a, b;
  cin >> a >> b;
  unsigned long long x = (a - b) / 2;
  unsigned long long y = b + x;
  if (a < b || a % 2 != b % 2 || ((x & (a - x)) != x))
    cout << -1 << endl;
  else
    cout << x << ' ' << y << endl;
  return 0;
}
