#include <bits/stdc++.h>
using namespace std;
const int N = 2005500;
int n;
map<int, int> D;
long long B = 19;
long long P = 32;
bool can(int k) {
  cout << "> " << k << endl;
  bool b;
  cin >> b;
  return b;
}
int a[N], diff;
vector<int> w;
int ask(int v) {
  cout << "? " << v << endl;
  cin >> v;
  return v;
}
map<int, vector<int>> vis;
vector<int> divisors(int v) {
  if (vis.count(v)) return vis[v];
  vector<int> w;
  for (int i = 1; i * i <= v; i++) {
    if (v % i == 0) {
      w.push_back(i);
      if (v / i != i) w.push_back(v / i);
    }
  }
  vis[v] = w;
  return w;
}
void go(int a, int b) {
  vector<int> d = divisors(abs(b - a));
  for (int x : d) D[x]++;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  cin >> n;
  long long l = 0, r = 1e9 + 1;
  int left = 60;
  while (r - l > 1) {
    int m = (r + l) / 2;
    if (can(m))
      l = m;
    else
      r = m;
    left--;
  }
  for (int i = 0, qwerty = n; i < qwerty; i++) a[i] = i + 1;
  shuffle(a, a + n, rng);
  for (int i = 0, qwerty = min(left, n); i < qwerty; i++) {
    w.push_back(ask(a[i]));
  }
  sort((w).begin(), (w).end());
  if (binary_search((w).begin(), (w).end(), r) == 0) w.push_back(r);
  for (int i = 0, qwerty = ((int)(w).size()); i < qwerty; i++)
    for (int j = i + 1, qwerty = ((int)(w).size()); j < qwerty; j++) {
      go(w[i], w[j]);
    }
  for (auto p : D)
    if (p.second == D[1] && r - (n - 1) * p.first >= 0) {
      diff = p.first;
    }
  cout << "! " << r - (n - 1) * diff << " " << diff << "\n";
}
