Z=10**6 print(0,0);a=int(input()) if a==0:exit() print(0,Z);b=int(input()) if b==0:exit() x=(a+b-Z)//2 print(x,a-x)