#include <bits/stdc++.h>
using namespace std;
mt19937 gen(34);
int n, x, zap;
vector<int> p;
int nod(int x, int y) {
  while (y != 0) {
    x %= y;
    swap(x, y);
  }
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  int l = 0, r = 1e9;
  while (r > l) {
    int mid = (l + r) >> 1;
    cout << "> " << mid << endl;
    zap++;
    cin >> x;
    if (x == 1)
      l = mid + 1;
    else
      r = mid;
  }
  p.push_back(l);
  while (zap < 60) {
    int q = (gen() % n) + 1;
    cout << "? " << q << endl;
    zap++;
    cin >> x;
    p.push_back(x);
  }
  int d = p[0] - p[1];
  for (int i = 0; i < p.size(); i++)
    for (int j = i; j < p.size(); j++) d = nod(d, abs(p[i] - p[j]));
  cout << "! " << p[0] - d * (n - 1) << ' ' << d;
  return 0;
}
