#include <bits/stdc++.h>
using namespace std;
unsigned long long int power(unsigned long long int a, unsigned long long int n,
                             unsigned long long int m);
unsigned long long int power(unsigned long long int a, unsigned long long int n,
                             unsigned long long int m) {
  if (n == 0) return 1;
  unsigned long long int x = power(a, n / 2, m);
  if (n % 2 != 0)
    return (((a * x) % m) * (x) % m) % m;
  else
    return (x * x) % m;
}
double PI = 3.14159265357;
int32_t main() {
  unsigned long long int n, i, j, x, y, m, k, t, sum, count, cnt, b, c, d, j1,
      z, a, temp;
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> x >> y;
  z = (x - y) / 2;
  if ((x % 2) != (y % 2)) {
    cout << "-1\n";
    return 0;
  }
  a = z;
  b = x - a;
  cout << min(a, b) << " " << max(a, b);
  return 0;
}
