#include <bits/stdc++.h>
using namespace std;
vector<long long> primes;
vector<long long> divisor;
const long long INF = 1e18;
bool Prime(long long x) {
  for (long long i = 2; i * i <= x; ++i) {
    if (x % i == 0) return false;
  }
  return true;
}
void solve() {
  divisor.clear();
  cout << "? " << 614889782588491410 << endl;
  cout.flush();
  long long response;
  cin >> response;
  for (long long i = 0; i <= 200; ++i) {
    if (response % primes[i] == 0) divisor.push_back(i);
  }
  cout << "? " << 38655288426304091 << endl;
  cout.flush();
  cin >> response;
  for (long long i = 0; i <= 200; ++i) {
    if (response % primes[i] == 0) divisor.push_back(i);
  }
  cout << "? " << 22125549654501673 << endl;
  cout.flush();
  cin >> response;
  for (long long i = 0; i <= 200; ++i) {
    if (response % primes[i] == 0) divisor.push_back(i);
  }
  cout << "? " << 316773187163046517 << endl;
  cout.flush();
  cin >> response;
  for (long long i = 0; i <= 200; ++i) {
    if (response % primes[i] == 0) divisor.push_back(i);
  }
  long long ans = 1;
  long long prevans = ans;
  for (long long i = 0; i < (long long)divisor.size(); ++i) {
    long long pos = divisor[i];
    long long val = primes[pos];
    long long cpy = val;
    long long cnt = 1;
    while (val <= INF) {
      if (val <= INF / cpy) {
        val *= cpy;
        ++cnt;
      } else
        break;
    }
    cout << "? " << val << endl;
    cout.flush();
    cin >> response;
    long long real = 0;
    while (response > 1) {
      ++real;
      response /= cpy;
    }
    ans *= (real + 1);
  }
  if ((long long)divisor.size() > 3) {
    ans *= 2;
  } else {
    long long cnt = 0;
    long long queries = 18 - (long long)divisor.size();
    long long asked = 0;
    long long temp = 1;
    for (long long i = 40; i <= 200 && asked < queries; ++i) {
      if (temp <= INF / primes[i]) {
        temp *= primes[i];
      } else {
        ++asked;
        cout << "? " << temp << endl;
        cout.flush();
        cin >> response;
        for (long long j = 0; j <= 200; ++j)
          if (response % primes[j] == 0) {
            ++cnt;
            long long addup = 0;
            while (response % primes[j] == 0) {
              ++addup;
              response /= primes[j];
            }
            ans *= (addup + 1);
          }
        temp = primes[i];
      }
    }
    if (cnt < 3) ans *= 2;
  }
  cout << "! " << ans << endl;
  cout.flush();
}
void sieve() {
  for (long long i = 2; i <= 10000; ++i) {
    if (Prime(i)) primes.push_back(i);
    if ((long long)primes.size() > 200) return;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  sieve();
  long long t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
