#include <bits/stdc++.h>
const int maxn = 1e6 + 10;
int n, cnt, tot, a[maxn], d;
bool v[maxn];
bool chk(int x) {
  int tmp;
  printf("> %d\n", x);
  ++cnt;
  fflush(stdout);
  scanf("%d", &tmp);
  return tmp;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  std::mt19937 mt_rand(time(0));
  int l = 0, r = 1e9, mid, tmp;
  scanf("%d", &n);
  while (l < r) {
    mid = (l + r) >> 1;
    if (chk(mid))
      l = mid + 1;
    else
      r = mid;
  }
  for (; cnt < 60 && tot < n;) {
    tmp = mt_rand() % n + 1;
    while (v[tmp]) tmp = mt_rand() % n + 1;
    v[tmp] = 1;
    printf("? %d\n", tmp);
    ++cnt;
    fflush(stdout);
    scanf("%d", &a[++tot]);
  }
  std::sort(a + 1, a + 1 + tot);
  if (a[tot] != l) a[++tot] = l;
  for (int i = 2; i <= tot; ++i) d = gcd(a[i] - a[i - 1], d);
  printf("! %d %d\n", l - (n - 1) * d, d);
  return 0;
}
