#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  ios::sync_with_stdio(false);
  unsigned long long a, b;
  cin >> a >> b;
  if ((a - b) & 1) {
    cout << -1 << '\n';
    return 0;
  }
  cout << (a - (b | ((a - b) >> 1))) << ' ' << (b | ((a - b) >> 1)) << '\n';
  return 0;
}
