#include <bits/stdc++.h>
using namespace std;
namespace {
static const int mo = 1e9 + 7;
void add(int &x, int y) {
  if ((x += y) >= mo) x -= mo;
}
void sub(int &x, int y) {
  if ((x -= y) < 0) x += mo;
}
int mul(int x, int y) { return 1ll * x * y % mo; }
int pw(int b, int p, int mo) {
  if (p < 2) return p ? b : 1;
  unsigned long long t = pw(b, p >> 1, mo);
  t = t * t % mo;
  return p & 1 ? t * b % mo : t;
}
void upd(int &x, int y) { add(x, y); }
}  // namespace
unsigned long long A, B, AA, BB, a[70], b[70], c[70], n, m, ans;
unsigned long long calc() {
  unsigned long long ret = 0;
  for (int i = n - 1; ~i; --i) ret |= (1llu << i) * c[i];
  return ret;
}
void dfs(int w, unsigned long long s, int lim1, int lim2) {
  if (calc() > ans) return;
  if (s > A) return;
  if (w == -1) {
    if (s != A) return;
    unsigned long long tmp = 0;
    for (int i = n - 1; ~i; --i) tmp |= (1llu << i) * c[i];
    ans = min(ans, tmp);
    return;
  }
  unsigned long long tmp =
      w < 62 ? 1llu << (w + 2) : ((1llu << 63) - 1) * 2 + 1;
  if (s + tmp < A) return;
  if (b[w] == 0) {
    if ((!lim1 && !lim2) || a[w] == 0)
      c[w] = 1, dfs(w - 1, s + (1ll << (w + 1)), lim1, lim2);
    c[w] = 0, dfs(w - 1, s, lim1 && a[w] == 0, lim2 && a[w] == 0);
  } else {
    if (lim1 && lim2 && a[w] == 0) return;
    if (a[w] == 0) {
      if (!lim2) c[w] = 0, dfs(w - 1, s + (1llu << w), 0, 0);
      if (!lim1) c[w] = 1, dfs(w - 1, s + (1llu << w), 0, 0);
    } else {
      c[w] = 0, dfs(w - 1, s + (1llu << w), 0, lim2);
      c[w] = 1, dfs(w - 1, s + (1llu << w), lim1, 0);
    }
  }
}
int main() {
  cin >> A >> B, AA = A, BB = B;
  do {
    a[n++] = A & 1, A >>= 1;
  } while (A);
  do {
    b[m++] = B & 1, B >>= 1;
  } while (B);
  A = AA, B = BB;
  ans = A + 1;
  dfs(n - 1, 0, 1, 1);
  if (ans == A + 1)
    puts("-1");
  else
    cout << ans << " " << A - ans << endl;
  return 0;
}

### Prompt

Please create a solution in cpp to the following problem:

Bitwise exclusive OR (or bitwise addition modulo two) is a binary operation which is equivalent to applying logical exclusive OR to every pair of bits located on the same positions in binary notation of operands. In other words, a binary digit of the result is equal to 1 if and only if bits on the respective positions in the operands are different.

For example, if X = 10910 = 11011012, Y = 4110 = 1010012, then: 

X xor Y = 6810 = 10001002. 

Write a program, which takes two non-negative integers A and B as an input and finds two non-negative integers X and Y, which satisfy the following conditions: 

  * A = X + Y
  * B = X xor Y, where xor is bitwise exclusive or. 
  * X is the smallest number among all numbers for which the first two conditions are true. 

Input

The first line contains integer number A and the second line contains integer number B (0 ≤ A, B ≤ 264 - 1).

Output

The only output line should contain two integer non-negative numbers X and Y. Print the only number -1 if there is no answer.

Examples

Input

142
76


Output

33 109

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
namespace {
static const int mo = 1e9 + 7;
void add(int &x, int y) {
  if ((x += y) >= mo) x -= mo;
}
void sub(int &x, int y) {
  if ((x -= y) < 0) x += mo;
}
int mul(int x, int y) { return 1ll * x * y % mo; }
int pw(int b, int p, int mo) {
  if (p < 2) return p ? b : 1;
  unsigned long long t = pw(b, p >> 1, mo);
  t = t * t % mo;
  return p & 1 ? t * b % mo : t;
}
void upd(int &x, int y) { add(x, y); }
}  // namespace
unsigned long long A, B, AA, BB, a[70], b[70], c[70], n, m, ans;
unsigned long long calc() {
  unsigned long long ret = 0;
  for (int i = n - 1; ~i; --i) ret |= (1llu << i) * c[i];
  return ret;
}
void dfs(int w, unsigned long long s, int lim1, int lim2) {
  if (calc() > ans) return;
  if (s > A) return;
  if (w == -1) {
    if (s != A) return;
    unsigned long long tmp = 0;
    for (int i = n - 1; ~i; --i) tmp |= (1llu << i) * c[i];
    ans = min(ans, tmp);
    return;
  }
  unsigned long long tmp =
      w < 62 ? 1llu << (w + 2) : ((1llu << 63) - 1) * 2 + 1;
  if (s + tmp < A) return;
  if (b[w] == 0) {
    if ((!lim1 && !lim2) || a[w] == 0)
      c[w] = 1, dfs(w - 1, s + (1ll << (w + 1)), lim1, lim2);
    c[w] = 0, dfs(w - 1, s, lim1 && a[w] == 0, lim2 && a[w] == 0);
  } else {
    if (lim1 && lim2 && a[w] == 0) return;
    if (a[w] == 0) {
      if (!lim2) c[w] = 0, dfs(w - 1, s + (1llu << w), 0, 0);
      if (!lim1) c[w] = 1, dfs(w - 1, s + (1llu << w), 0, 0);
    } else {
      c[w] = 0, dfs(w - 1, s + (1llu << w), 0, lim2);
      c[w] = 1, dfs(w - 1, s + (1llu << w), lim1, 0);
    }
  }
}
int main() {
  cin >> A >> B, AA = A, BB = B;
  do {
    a[n++] = A & 1, A >>= 1;
  } while (A);
  do {
    b[m++] = B & 1, B >>= 1;
  } while (B);
  A = AA, B = BB;
  ans = A + 1;
  dfs(n - 1, 0, 1, 1);
  if (ans == A + 1)
    puts("-1");
  else
    cout << ans << " " << A - ans << endl;
  return 0;
}

```