#include <bits/stdc++.h>
using namespace std;
char Buf[1 << 20];
int Left = 60;
int GCD(int a, int b) {
  if (!b) return a;
  return GCD(b, a % b);
}
int GCD(set<int> &s) {
  int g = *(s.begin());
  for (int x : s) {
    g = GCD(g, x);
  }
  return g;
}
bool Check(int x) {
  --Left;
  printf("> %d\n", x);
  fflush(stdout);
  int r;
  scanf("%d", &r);
  return r;
}
int Read(int x) {
  printf("? %d\n", x);
  fflush(stdout);
  int r;
  scanf("%d", &r);
  return r;
}
void Solve() {
  int n;
  cin >> n;
  if (n <= 60) {
    vector<int> v;
    for (int i = 1; i <= n; ++i) {
      int x = Read(i);
      v.push_back(x);
    }
    sort(v.begin(), v.end());
    printf("! %d %d\n", v[0], v[1] - v[0]);
    fflush(stdout);
    return;
  }
  int lo = 0, hi = 1e9 + 1;
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    if (Check(mid)) {
      lo = mid + 1;
    } else {
      hi = mid;
    }
  }
  int mx = lo;
  set<int> s;
  for (int i = 0; i < Left && i < n; ++i) {
    int rnd = rand() % n;
    rnd = rnd * rnd % n;
    if (rnd < 0) rnd += n;
    int j = rnd + 1;
    int x = Read(j);
    int d = mx - x;
    if (d) {
      s.insert(d);
    }
  }
  int g = GCD(s);
  int f = mx - (n - 1) * g;
  printf("! %d %d\n", f, g);
  fflush(stdout);
}
int main() {
  srand(0xbee35);
  Solve();
  return 0;
}
