#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
const long long INF = 1001001001001001LL;
const long long MOD = 1000003LL;
vector<long long int> erat(long long int n) {
  vector<long long int> primes(n);
  for (long long int i = 2; i < n; ++i) primes[i] = i;
  for (long long int i = 2; i * i < n; ++i)
    if (primes[i])
      for (long long int j = i * i; j < n; j += i) primes[j] = 0;
  primes.erase(remove(primes.begin(), primes.end(), 0), primes.end());
  return primes;
}
long long int mod_pow(long long int x, long long int k) {
  long long int res = 1;
  for (; k > 0; k >>= 1) {
    if (k & 1) (res *= x) %= MOD;
    (x *= x) %= MOD;
  }
  return res;
}
long long int det(vector<vector<long long int> > mat, bool debug = false) {
  long long int N = mat.size();
  for (long long int i = 0; i < N; i++) {
    for (long long int j = 0; j < N; j++) {
      if (i < j) {
        long long int buf = mat[j][i] * mod_pow(mat[i][i], MOD - 2) % MOD;
        for (long long int k = 0; k < N; k++) {
          long long int sub = mat[i][k] * buf % MOD;
          mat[j][k] = (mat[j][k] + MOD - sub) % MOD;
        }
      }
    }
  }
  if (debug) {
    for (long long int i = 0; i < N; i++) {
      for (long long int j = 0; j < N; j++) {
        fprintf(stderr, "%lld ", mat[i][j]);
      }
      fprintf(stderr, "\n");
    }
  }
  long long int res = 1;
  for (long long int i = 0; i < N; i++) (res *= mat[i][i]) %= MOD;
  return res;
}
long long int eval_expr(vector<long long int> A, long long int x) {
  long long int res = 0, base = 1;
  for (long long int i = 0; i < (long long int)A.size(); i++) {
    (res += base * A[i]) %= MOD;
    (base *= x) %= MOD;
  }
  return res;
}
signed main() {
  vector<long long int> primes = erat(100010);
  const long long int MAX_QUERY = 50;
  const long long int EXPR_SIZE = 11;
  vector<vector<long long int> > mat1, mat2;
  for (long long int i = 0; i < EXPR_SIZE; i++) {
    cout << "? " << primes[i] << endl;
    long long int res;
    cin >> res;
    if (res == 0) {
      cout << "! " << primes[i] << endl;
      return 0;
    }
    vector<long long int> coeffs(EXPR_SIZE, 1);
    for (long long int k = 1; k < EXPR_SIZE; k++) {
      coeffs[k] = (coeffs[k - 1] * primes[i]) % MOD;
    }
    mat1.push_back(coeffs);
    coeffs.push_back(res);
    mat2.push_back(coeffs);
  }
  const long long int D = 0;
  const long long int E = 1;
  vector<long long int> A(EXPR_SIZE);
  for (long long int k = 0; k < EXPR_SIZE; k++) {
    vector<vector<long long int> > Z(EXPR_SIZE,
                                     vector<long long int>(EXPR_SIZE));
    for (long long int i = 0; i < EXPR_SIZE; i++) {
      for (long long int j = 0; j < EXPR_SIZE; j++) {
        if (j == k) {
          Z[i][j] = mat2[i][EXPR_SIZE];
        } else {
          Z[i][j] = mat2[i][j];
        }
      }
    }
    A[k] = det(Z, k < E);
  }
  for (long long int i = 0; i < MOD; i++) {
    if (eval_expr(A, i) == 0) {
      cout << "! " << i << endl;
      return 0;
    }
  }
  cout << "! " << -1 << endl;
  return 0;
}
