//
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <vector>
#include <queue>
#include <cstring>
#include <map>
#include <math.h>
using namespace std;
typedef long long lll;

int main()
{
    lll a,b,d,x,y;

    cin >> a >> b;
    
    a=a/2-2;
    d=sqrt(a*a-4*b);
    
    x=(a+d)/2;
    y=(a-d)/2;
    
    cout << x+2 << " " << y+2;



    //system("pause");
    return 0;
}
