#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long A, B, X, Y;
  cin >> A >> B;
  if (A < B || (A - B) % 2ULL) {
    printf("-1\n");
    return 0;
  }
  X = (A - B) / 2ULL;
  Y = B + X;
  cout << X << " ";
  cout << Y << endl;
  return 0;
}
