#include <stdio.h>
#include <math.h>
int main()
{
    int s,p,x,y;
    scanf("%d%d",&s,&p);
    x=(s+sqrt(float(s*s-4*p)))/2;
    y=s-x;
    if(x<=y) printf("%d %d",x,y);
    else printf("%d %d",y,x);
    return 0;
} 