#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
vector<int> v;
int main() {
  unsigned long long a, b;
  cin >> a >> b;
  if (a < b or (a - b) % 2 == 1) {
    printf("-1\n");
    return 0;
  }
  unsigned long long A = a - b;
  A /= 2;
  cout << A << " " << a - A << endl;
  return 0;
}
