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