#include <bits/stdc++.h>
int main() {
  unsigned long long a, b, x;
  std::cin >> a >> b;
  if (a < b | (a - b) & 1)
    std::cout << -1;
  else {
    x = (a - b) / 2;
    a -= x;
    x ^ a ^ b ? std::cout << -1 : std::cout << x << ' ' << a;
  }
}
