#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int army[maxn];
int main() {
  unsigned long long a, b;
  while (cin >> a >> b) {
    unsigned long long x = (a - b) / 2;
    unsigned long long y = x + b;
    if (x == a - y)
      cout << x << " " << y << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
