def diff(a, b): '''Return the absolute linear distance between a and b''' if a is None or b is None: return 0 return abs(a - b) def main(): ''' Read pairs of numbers and finds the one with maximum linear distance ''' # Store the max distance pair max1 = None max2 = None # Read four pairs from stdin for _ in range(4): num1 = int(input()) num2 = int(input()) #if this pair is more distance than the known one if diff(num1, num2) > diff(max1, max2): max1 = num1 max2 = num2 # Print the max-difference pair found print(max1, max2) main()