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