#include <bits/stdc++.h>
using namespace std;
long long n, tot, q[107];
bool check(long long x) {
  --tot;
  cout << "> " << x << endl;
  long long t;
  cin >> t;
  return t;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
inline int rnd() {
  static int seed = 12345;
  return seed = (int)seed * 482711LL % 2147483647;
}
int main() {
  cin >> n;
  tot = 60;
  long long l = 0, r = 1e9, mid, d = 0;
  while (l < r) {
    mid = (l + r) >> 1;
    if (check(mid))
      l = mid + 1;
    else
      r = mid;
  }
  q[++q[0]] = l;
  for (int i = 1; i <= tot; ++i) {
    long long ai, id = (rnd() % n + 1);
    cout << "? " << id << endl;
    cin >> ai;
    q[++q[0]] = ai;
  }
  for (int i = 1; i <= q[0]; ++i)
    for (int j = 1; j <= q[0]; ++j) d = gcd(d, abs(q[i] - q[j]));
  cout << "! " << l - (n - 1) * d << " " << d << endl;
  return 0;
}
