f(x:y:_)=head[putStrLn$unwords$map show[a,x-a]|a<-[0..],a*(x-a)==y];m@main=getLine>>=f.map read.words>>m