from functools import cmp_to_key N,Q=map(int,input().split()) A_=[i for i in range(N)] def ans(a,b,c,d): print('?',a,b,c,d,flush=True) X=int(input()) return X if A_[a-1:b] < A_[c-1:d]: print(0) return 1 else: print(1) return 0 mi=[] ma=[] for i in range(1,N,2): X=ans(i,N,i+1,N) if X==1: mi.append(i) ma.append(i+1) else: ma.append(i) mi.append(i+1) mians=mi[0] for i in range(1,len(mi)): X=ans(mians,mians,mi[i],mi[i]) if X==0: mians=mi[i] maans=ma[0] for i in range(1,len(ma)): X=ans(maans,N,ma[i],N) if X==1: maans=ma[i] #print(ma[:10]) print('!',mians,mians,maans,N)