m@main=getLine>>=putStrLn.f.map read.words>>m f[a,b]=[shows x" "++show(a-x)|x<-[0..],x*(a-x)==b]!!0