#include <bits/stdc++.h>

using namespace std;

using ll = long long;
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

void solve();

int main() {
	cin.tie(nullptr)->sync_with_stdio(false);
	cout << fixed << setprecision(30);
	int t = 1;
	// cin >> t;
	while (t--) {
		solve();
	}
}

void solve() {
	int n, m;
	cin >> n >> m;
	cout << m - n + 1 << ' ' << -1 << '\n';
}
