""" This template provides a simple way to be able to test Online Judge solutions written in Python. The code above the cutoff line replaces stdin with a input text file. Copy the sample input from Online Judge into input.txt, and then test your program with python prog.py When you're done, only submit the code below the line. """ import sys sys.stdin = open("input.txt", "r") # This can be helpful for dealing with large outputs # sys.stdout = open("output.txt", "w") # === Only submit code below this line ========================================================= import sys for line in sys.stdin: # Here a few common ways to read inputs # Single integer inputs # x = int(line) # Multiple, space-separated integer inputs # inputs = map(int, line.split()) # or (if you're expecting a fixed number of inputs (n = 2 in this case)) # x, y = map(int, line.split()) # Write the rest of your program here + delete 'pass' pass