print(0,0) a=int(input()) if a==0: exit() print(a,0) b=int(input()) if b==0: exit() X,Y=a-b//2,b//2 print(X,Y) input()