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