#include <bits/stdc++.h>
using namespace std;
int rem = 60;
int ask(char t, int x) {
  if (rem == 0) assert(false);
  printf("%c %d\n", t, x);
  fflush(0);
  scanf("%d", &x);
  assert(x != -1);
  return x;
}
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  srand(time(0));
  int n;
  scanf("%d", &n);
  int l = 0, r = 1000000000, m, res = 0;
  while (l <= r) {
    m = (l + r) / 2;
    --rem;
    if (ask('>', m))
      l = m + 1;
    else {
      r = m - 1;
      res = m;
    }
  }
  vector<int> ord;
  for (int i = 0; i < n; ++i) ord.push_back(i + 1);
  random_shuffle(ord.begin(), ord.end());
  reverse(ord.begin(), ord.end());
  random_shuffle(ord.begin(), ord.end());
  for (int i = 0; i < 2000000; ++i) {
    int idx = ((long long)rand() << 15) | rand();
    idx = (idx % n + n) % n;
    int a = idx;
    idx = ((long long)rand() << 15) | rand();
    idx = (idx % n + n) % n;
    int b = idx;
    swap(ord[a], ord[b]);
  }
  set<int> s;
  s.insert(res);
  for (int i = 0; i < rem && i < ord.size(); ++i) s.insert(ask('?', ord[i]));
  int g = 0;
  for (auto x : s)
    for (auto y : s) g = gcd(g, abs(x - y));
  if (res - (n - 1) * g < 0)
    while (true)
      ;
  printf("! %d %d\n", res - (n - 1) * g, g);
  fflush(0);
  return 0;
}
