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