import sys def Question(K): print(f'? {K}') sys.stdout.flush() return int(input()) def Answer(L, R): print(f'! {L} {R}') sys.stdout.flush() exit() N = int(input()) M = N // 2 - 1 if Question(M * 2) == M: Answer(1, M * 1) if Question(2) == 1: Answer(3, N) Answer(2, N - 1)