#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
const long long int N = 2e3 + 5;
const long long int M = 1e5 + 5;
const long long int mod = 1e9 + 7;
const long long int m1 = 1e9 + 7;
const long long int m2 = 1e9 + 9;
const long long int p1 = 402653189;
const long long int p2 = 1610612741;
const int LN = 61;
long long int powermodm(long long int x, long long int n, long long int M) {
  long long int result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
long long int power(long long int _a, long long int _b) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a);
    _b /= 2;
    _a = (_a * _a);
  }
  return _r;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (max(a, b) / gcd(a, b)) * min(a, b);
}
long long int dx[4] = {-1, 1, 0, 0};
long long int dy[4] = {0, 0, 1, -1};
long long int pw[LN], fact[N], invfact[N];
void pre() {
  fact[0] = 1;
  for (int i = 0; i < LN; i++) pw[i] = power(2, i);
  for (int i = 1; i < N; i++) fact[i] = (i * fact[i - 1]) % mod;
  for (int i = 0; i < N; i++) invfact[i] = powermodm(fact[i], mod - 2, mod);
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int i, j;
  long long int n;
  cin >> n;
  long long int l = 0, r = 1e9, ma = r;
  long long int cnt = 0, tcnt = 0;
  bool visited[n + 1];
  memset(visited, false, sizeof(visited));
  while (l <= r) {
    long long int mid = (l + r) >> 1;
    cnt++;
    cout << "> " << mid << endl;
    fflush(stdout);
    long long int x;
    cin >> x;
    if (x) {
      l = mid + 1;
    } else {
      ma = min(ma, mid);
      r = mid - 1;
    }
  }
  vector<long long int> tmp;
  tmp.push_back(ma);
  while (cnt < 60 && tcnt < n) {
    long long int idx = rng() % n + 1;
    if (!visited[idx]) {
      cnt++;
      tcnt++;
      visited[idx] = true;
      cout << "? " << idx << endl;
      fflush(stdout);
      long long int val;
      cin >> val;
      tmp.push_back(val);
    }
  }
  sort(tmp.begin(), tmp.end());
  long long int d = 0;
  for (i = 0; i < tmp.size() - 1; i++) d = gcd(d, tmp[i + 1] - tmp[i]);
  long long int a = ma - d * (n - 1);
  cout << "! " << a << " " << d << endl;
  fflush(stdout);
  return 0;
}
