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