while True:
    try:
        a, b = map(int, input().split())
        heights = []
        for i in range(a):
            heights.append(list(map(int, input().split())))
        max_num = 0
        x, y = 0, 0
        for i in range(a):
            for j in range(b):
                if heights[i][j] > max_num:
                    max_num = heights[i][j]
                    x, y = i + 1, j + 1
        print(f"{x} {y}")
    except:
        break