print(0,0) x=int(input()) if x==0:exit() print(x,0) d=int(input()) if d==0:exit() print(x-d//2,d//2)