total = [] for numbers in range(9): total.append(int(input())) x = max(total) print(x) print(total.index(x)+1)