#include <bits/stdc++.h>
using namespace std;
mt19937 rd(chrono::system_clock::now().time_since_epoch().count());
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int n, k;
bool vis[1000010];
vector<int> e;
int main() {
  cin >> n;
  uniform_int_distribution<int> p(1, n);
  int l = 0, r = 1000000000, ans = 0;
  while (l <= r) {
    int t, mid = (l + r) >> 1;
    cout << "> " << mid << endl;
    cin >> t;
    ++k;
    if (t)
      l = mid + 1;
    else
      r = mid - 1, ans = mid;
  }
  k = std::min(60 - k, n);
  for (int i = 1; i <= k; i++) {
    int d = p(rd), t;
    while (vis[d]) d = p(rd);
    vis[d] = 1;
    cout << "? " << d << endl;
    cin >> t;
    e.push_back(t);
  }
  sort(e.begin(), e.end());
  int res = e[1] - e[0];
  for (int i = 2; i < int(e.size()); i++) res = gcd(res, e[i] - e[i - 1]);
  cout << "! " << ans - (n - 1) * res << ' ' << res << endl;
  return 0;
}
