num1 = int( input() )
num2 = int( input() )

if num1 > 0:
    if num2 > 0:
        print(num1, num2)

num1 = int( input() )
num2 = int( input() )

if num1 > 0:
    if num2 > 0:
        print(num1, num2)
