#include <bits/stdc++.h>
using namespace std;
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
long long mm(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0)
    return a;
  else
    return mm(b, a % b);
}
int main() {
  srand(time(NULL));
  long long n;
  cin >> n;
  long long c = 60;
  long long hi, lo, mi;
  hi = 1000000000;
  lo = 0;
  long long ans;
  while (lo <= hi) {
    mi = (hi + lo) / 2;
    cout << "> " << mi << endl;
    fflush(stdout);
    long long x;
    cin >> x;
    c--;
    if (x == 1) {
      ans = mi;
      lo = mi + 1;
    } else {
      hi = mi - 1;
    }
  }
  ans++;
  vector<long long> check;
  set<int> s;
  c = min(c, n);
  while (s.size() != c) {
    s.insert((rng32() % n) + 1);
  }
  while (!s.empty()) {
    cout << "? " << *s.begin() << endl;
    fflush(stdout);
    long long t;
    cin >> t;
    check.push_back(t);
    s.erase(s.begin());
  }
  check.push_back(ans);
  sort(check.begin(), check.end());
  long long ggd = 0;
  for (long long i = 1; i < check.size(); i++)
    ggd = mm(ggd, check[i] - check[i - 1]);
  long long a = ans - ((n - 1) * ggd);
  cout << "! " << a << " " << ggd << endl;
  fflush(stdout);
  return 0;
}
