#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << endl;
}
const long long sze = 1e5 + 50, oo = 1e18 + 500, mod = 1e9 + 7;
const long double eps = 1e-9, PI = 2 * acos(0.0);
vector<long long> vertices[sze];
vector<char> visit(sze, false);
vector<long long> arr(sze, 0);
long long n, m, k;
long long A, B;
long long cnt = 0;
bool check(long long a1, long long an, long long d, vector<long long> &a) {
  for (long long i = 0; i < a.size(); i++) {
    long long dif = an - a[i];
    if (dif % d) {
      return false;
    }
    long long j = (dif / d - n) * (-1);
    if (a1 != a[i] - (j - 1) * d) {
      return false;
    }
  }
  return true;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long l = 0, r = 1e9;
  while (r - l > 1) {
    long long md = (l + r) >> 1;
    cout << "> " << md << endl;
    cnt++;
    bool fl;
    cin >> fl;
    if (fl) {
      l = md;
    } else {
      r = md;
    }
  }
  cnt = 60 - cnt;
  long long mx = r;
  long long mn = oo;
  if (n <= cnt) {
    for (long long i = 0; i < n; i++) {
      cout << "? " << i + 1 << endl;
      long long val;
      cin >> val;
      mn = min(mn, val);
      ;
    }
  } else {
    vector<long long> a(cnt);
    k = n / cnt;
    for (long long i = 0; i < cnt; i++) {
      long long ind = i * k + 1;
      cout << "? " << ind << endl;
      cin >> a[i];
    }
    for (long long d = mx / (n - 1); d >= 1; d--) {
      long long a1 = mx - d * (n - 1);
      if (check(a1, mx, d, a)) {
        mn = a1;
        break;
      }
    }
  }
  cout << "! " << mn << " " << (mx - mn) / (n - 1);
  return 0;
}
