for(;[y,b]=readline(x=0).split(' ');print(x,y))for(;x*y-b;--y)++x