#include <bits/stdc++.h>
using namespace std;
using i64 = long long int;
using ii = pair<int, int>;
using ii64 = pair<i64, i64>;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool used[1000005];
int main() {
  int n;
  cin >> n;
  mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
  uniform_int_distribution<int> ud(1, n);
  vector<int> pos;
  int q = 59;
  int lo = 0, hi = 1e9;
  int large = 0;
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    q--;
    cout << "> " << mid << endl;
    int res;
    cin >> res;
    if (res == 1) {
      lo = mid + 1;
    } else {
      large = mid;
      hi = mid - 1;
    }
  }
  for (int i = 0; i < min(q, n); i++) {
    int k = ud(mt);
    while (used[k]) k = ud(mt);
    used[k] = true;
    pos.push_back(k);
  }
  vector<int> v;
  for (int i = 0; i < pos.size(); i++) {
    cout << "? " << pos[i] << endl;
    int k;
    cin >> k;
    v.push_back(k);
  }
  sort((v).begin(), (v).end());
  int g = v[1] - v[0];
  for (int i = 0; i < v.size(); i++)
    for (int j = i + 1; j < v.size(); j++) g = gcd(g, v[j] - v[i]);
  int start = large - (n - 1) * g;
  cout << "! " << start << " " << g << endl;
  return 0;
}
