#include<string>
#include<cstdio>
#include<vector>
#include<cstdlib>
#include<iostream>
#include<math.h>

using namespace std;

int main (void)
{
	long int c, s;
	long int x1, x2;

	cin >> c;
	cin >> s;

	x1 = (c / 2 + 2 + (long int)sqrt((float)((c / 2 + 2) * (c / 2 + 2) - 4 * (s + c)))) / 2;
	x2 = (c / 2 + 2 - (long int)sqrt((float)((c / 2 + 2) * (c / 2 + 2) - 4 * (s + c)))) / 2;

	cout << x1 << " " << x2;

	cout << endl;
}
