while 1:a,b=map(int,raw_input().split());x=int(a-(a*a-4*b)**.5)/2;print x,a-x