#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int gcd(int a, int b) {
  if (a == 0 || b == 0) return a + b;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int l = -1, r = 1e9;
  int cnt = 0;
  while (r - l > 1) {
    cnt++;
    int m = (r + l) / 2;
    cout << "> " << m << endl;
    int ans;
    cin >> ans;
    if (ans == -1) return -1;
    if (ans == 1) {
      l = m;
    } else
      r = m;
  }
  vector<int> a;
  a.push_back(r);
  for (int i = 0; i < 60 - cnt; i++) {
    int x = rnd() % n + 1;
    cout << "? " << x << endl;
    int p;
    cin >> p;
    if (p == -1) return -1;
    a.push_back(p);
  }
  vector<int> b;
  for (int i = 0; i < a.size(); i++) {
    for (int j = i + 1; j < a.size(); j++) {
      b.push_back(abs(a[i] - a[j]));
    }
  }
  int d = 0;
  for (int i = 0; i < b.size(); i++) d = gcd(d, b[i]);
  int x1 = r - d * (n - 1);
  cout << "! " << x1 << " " << d << endl;
  return 0;
}
