#include <bits/stdc++.h>
using namespace std;
int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return f * x;
}
int n;
bool vis[1000005] = {0};
int gcd(int a, int b) { return (!b) ? a : gcd(b, a % b); }
void init() {
  scanf("%d", &n);
  srand(12455);
}
void solve() {
  int l = 0, r = 1000000000;
  int left = 60;
  while (r > l) {
    int mid = (r + l) >> 1;
    printf("> %d\n", mid);
    fflush(stdout);
    int res;
    scanf("%d", &res);
    left--;
    if (res)
      l = mid + 1;
    else
      r = mid;
  }
  int ans = 0, alu = 0;
  while (left > 0 && alu < n) {
    int cur = (rand() * rand() % n) + 1;
    if (!vis[cur]) {
      vis[cur] = true;
      alu++;
      printf("? %d\n", cur);
      fflush(stdout);
      int res;
      scanf("%d", &res);
      left--;
      if (res != l) {
        if (!ans)
          ans = l - res;
        else {
          ans = gcd(ans, l - res);
        }
      }
    }
  }
  int x1 = l - (n - 1) * ans;
  printf("! %d %d\n", x1, ans);
  fflush(stdout);
}
int main() {
  init();
  solve();
  return 0;
}
