#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int gcd(int a, int b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
bool geq(int x) {
  cout << "> " << x << '\n';
  cout << flush;
  bool r;
  cin >> r;
  return r;
}
int val(int pos) {
  cout << "? " << pos << '\n';
  cout << flush;
  int v;
  cin >> v;
  return v;
}
void solve() {
  int n;
  cin >> n;
  vector<int> perm(n + 1, 0);
  for (int j = 1; j <= n; j++) perm[j] = j;
  int l = 0, r = 1e9;
  while (r - l + 1 > 2) {
    int x = (l + r) / 2;
    if (geq(x)) {
      l = x;
    } else
      r = x;
  }
  int mx = r;
  shuffle(perm.begin() + 1, perm.end(), rng);
  vector<int> v;
  for (int j = 1; j <= min(n, 30); j++) v.push_back(val(perm[j]));
  sort(v.begin(), v.end());
  vector<int> d;
  for (int j = 1; j < min(n, 30); j++) {
    d.push_back(v[j] - v[j - 1]);
  }
  int ans = 0;
  for (auto u : d) ans = gcd(ans, u);
  cout << "! " << mx - (n - 1) * ans << " " << ans << '\n';
  cout << flush;
  return;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
