#include <bits/stdc++.h>
using namespace std;
int a[37], t = 1;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
inline int random(int x) { return (long long)rand() * rand() % x + 1; }
inline bool pd(int x) {
  printf("> %d\n", x);
  fflush(stdout);
  scanf("%d", &x);
  return x;
}
int main() {
  srand((unsigned)time(0));
  int n, cnt = 60;
  cin >> n;
  int l = 0, r = 1e9;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (pd(mid))
      l = mid + 1;
    else
      r = mid;
    --cnt;
  }
  a[1] = l;
  while (cnt--) {
    printf("? %d\n", random(n));
    fflush(stdout);
    scanf("%d", &a[++t]);
  }
  int d = abs(a[1] - a[2]);
  for (int i = 1; i <= t; i++)
    for (int j = i + 1; j <= t; j++) d = gcd(d, abs(a[i] - a[j]));
  printf("! %d %d\n", l - (n - 1) * d, d);
  return 0;
}
