#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int a, b;
  cin >> a >> b;
  if ((((a - b) / 2) ^ ((a + b) / 2) == b) && (a % 2 == b % 2))
    cout << (a - b) / 2 << " " << (a + b) / 2 << "\n";
  else
    cout << -1 << "\n";
}
