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