#include <bits/stdc++.h>
using namespace std;
long long q(long long x, char type) {
  long long ans;
  cout << type << " " << x << endl;
  fflush(stdout);
  cin >> ans;
  return ans;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
vector<long long> fact(long long x) {
  vector<long long> res;
  for (long long i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      res.push_back(i);
      if (i != x / i) res.push_back(x / i);
    }
  }
  sort(res.begin(), res.end(), greater<long long>());
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  long long n, l = 0, r = 1e9, g = 0;
  vector<long long> mas, num;
  set<long long> indx;
  cin >> n;
  while (r - l > 1) {
    long long mid = (r + l) / 2;
    if (q(mid, '>')) {
      l = mid;
    } else {
      r = mid;
    }
  }
  long long mx = r;
  for (long long i = 0; i < min(30ll, n); i++) {
    long long cur;
    do {
      cur = rng() % n + 1;
    } while (indx.find(cur) != indx.end());
    num.push_back(q(cur, '?'));
    indx.insert(cur);
  }
  sort(num.begin(), num.end());
  if (num.back() != mx) num.push_back(mx);
  for (long long i = 1; i < num.size(); i++) {
    g = gcd(g, num[i] - num[i - 1]);
  }
  auto divs = fact(g);
  for (auto i : divs) {
    long long fir = mx - (n - 1) * i;
    if (fir >= 0 && fir <= num.front()) {
      cout << "! " << fir << " " << i;
      break;
    }
  }
  return 0;
}
