#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, b;
  while (scanf("%I64u%I64u", &a, &b) != EOF) {
    if (a % 2 != b % 2 || a < b)
      printf("-1\n");
    else
      printf("%I64u %I64u\n", (a - b) / 2, (a + b) / 2);
  }
  return 0;
}
