def eratosthenes(n): res=[0]*(n+1) prime=set([]) for i in range(2,n+1): if not res[i]: prime.add(i) for j in range(i,n+1,i): res[j]=1 return sorted(list(prime)) N=int(input()) prime = eratosthenes(N) ans = 1 cnt=0 for p in prime: y=1 while True: cnt+=1 y*=p print(f"! {y}", flush=True) s=int(input()) if s==1:break if s==y:continue ans *= y//p break print(f"! {ans}", flush=True)