from sys import stdout, exit, stderr from random import shuffle, seed # @EXPECTED_RESULTS@: WRONG_ANSWER, TIME_LIMIT_EXCEEDED # seed(1) def get(i, j): print("?", i, j) stdout.flush() return input() def below(x1, y1, x2, y2, x3, y3): """Assuming x1 < x2, does (x3, y3) lie below the line through ((x1, y1), (x2, y2))?""" return (y3 - y1)*(x2 - x1) < (x3 - x1)*(y2 - y1) def above(x1, y1, x2, y2, x3, y3): return below(x2, y2, x1, y1, x3, y3) w, h = [int(x) for x in input().split()] horizon_pts = [] remaining_points = [(i, j) for i in range(1, w+1) for j in range(1, h+1)] shuffle(remaining_points) while len(horizon_pts) < 2: prlen = len(remaining_points) print(len(remaining_points), file=stderr) # print((remaining_points), file=stderr) i, j = remaining_points.pop() cl = get(i, j) print(i, j, cl, file=stderr) if cl == "horizon": horizon_pts.append((i, j)) elif cl == "sea": remaining_points = [(x, y) for x, y in remaining_points if not ( (x == i and y < j) or (1 < x < i and below(1, 1, i, j, x, y)) or (i < x < w and below(i, j, w, 1, x, y)))] else: remaining_points = [(x, y) for x, y in remaining_points if not( (x == i and y > j) or (1 < x < i and above(1, h, i, j, x, y)) or (i < x < w and above(i, j, w, h, x, y)))] print("num removed=",prlen - len(remaining_points), file=stderr) if len(horizon_pts) < 2: print(horizon_pts, file=stderr) print(remaining_points, file=stderr) print("!", *horizon_pts[0], *horizon_pts[1])