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