#!/usr/bin/env python3 import random w, h = map(int, input().split()) sea = [] sky = [] horizon = [] def q(x, y): if (x,y) in horizon: return 0 print(f'? {x+1} {y+1}', flush=True) a = input() if a == 'horizon': horizon.append((x,y)) # WRONG ANSWER: This prints the same point twice. horizon.append((x,y)) if len(horizon) == 2: print(f'! {horizon[0][0]+1} {horizon[0][1]+1} {horizon[1][0]+1} {horizon[1][1]+1}') exit(0) return 0 if a == 'sky': sky.append((x,y)) return 1 if a == 'sea': sea.append((x,y)) return -1 assert False def bs(x): b, t = 0, h-1 while b < t: m = (b+t+1)//2 a = q(x, m) if a == 0: return m if a == 1: t = m-1 else: b = m return b ly, ry = bs(0), bs(w-1) lb, lt = (0, ly), (0, ly+1) rb, rt = (w-1, ry), (w-1, ry+1) def dot(p, q): return p[0] * q[1] - p[1] * q[0] def above(l, r, p): return dot((l[0]-p[0], l[1]-p[1]), (r[0]-p[0], r[1]-p[1])) >= 0 def below(l, r, p): return dot((l[0]-p[0], l[1]-p[1]), (r[0]-p[0], r[1]-p[1])) <= 0 def known_sky(p): for q in sky: if above(lt, q, p) and above(q, rt, p): return True return False def known_sea(p): for q in sea: if below(lb, q, p) and below(q, rb, p): return True return False while True: x = random.randint(1, w-1) y = ly + (x*(ry-ly)+w-2)//(w-1) if known_sea((x,y)) or known_sky((x,y)): continue q(x,y)