#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int getrnd(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
template <typename T1, typename T2>
bool relax(T1& a, const T2& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
bool strain(T1& a, const T2& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int asked = 0;
int ask(int i) {
  cout << "? " << i << endl;
  int r;
  cin >> r;
  if (r == -1) exit(0);
  return r;
}
int askBigger(int x) {
  ++asked;
  cout << "> " << x << endl;
  int r;
  cin >> r;
  if (r == -1) exit(0);
  return r;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void solve() {
  int n;
  cin >> n;
  vector<int> order(n);
  iota(order.begin(), order.end(), 1);
  shuffle(order.begin(), order.end(), rng);
  int l = -1, r = 1e9 + 2, mid;
  while (r - l > 1) {
    mid = (r + l) / 2;
    if (askBigger(mid))
      l = mid;
    else
      r = mid;
  }
  int mx = r, d = 0;
  for (int i = 0; i < min(60 - asked, n); ++i) {
    int x = ask(order[i]);
    d = gcd(mx - x, d);
  }
  cout << "! " << mx - (n - 1) * d << ' ' << d << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(0));
  int t = 1;
  while (t--) solve();
  return 0;
}
