N = int(input()) M = N + 1 DP = [1] * M DP[0] = 0 DP[1] = 0 L = [] for i in range(2, M): if DP[i] == 1: for j in range(i + i, M, i): DP[j] = 0 k = i while k < M: k *= i k //= i L.append(k) ans = 1 cnt = 0 for n in L: print("?", n, flush = True) ans *= int(input()) cnt += 1 if cnt == 600: break print("!", ans)