#include <stdio.h>
#include <math.h>

main() 
{
       int C;
       long int S;
       
       scanf ( "%d%d", &C, &S );
       
       long int A;
       long int B;
       
       A = ( C / 2 + 2 + sqrt(pow((C / 2 + 2), 2) - 4 * (S + C)) ) / 2;
       B = ( C / 2 + 2 - sqrt(pow((C / 2 + 2), 2) - 4 * (S + C)) ) / 2;
       
      
      printf ("%ld %ld", A, B );
      
     
}

       
      
