#include <bits/stdc++.h>
using namespace std;
int q;
int n;
int nMax;
int nD;
int nIndex[1000005];
bool check(int n) {
  q++;
  cout << "> " << n << endl;
  cout.flush();
  int x;
  cin >> x;
  if (x)
    return true;
  else
    return false;
}
int query(int i) {
  q++;
  cout << "? " << i << endl;
  cout.flush();
  int x;
  cin >> x;
  return x;
}
int getMax() {
  int left = 0;
  int right = 1e9;
  while (left < right - 1) {
    int mid = (left + right) / 2;
    if (check(mid)) {
      left = mid;
    } else {
      right = mid;
    }
  }
  return right;
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
inline int rnd() {
  static int seed = 2333;
  return seed = (((seed * 666666ll + 20050818) % 998244353) ^ 1000000007) %
                1004535809;
}
int getD() {
  int i;
  for (i = 0; i < n && i < 60; i++) {
    int ti = rnd() % (n - i) + i;
    int tmp = nIndex[i];
    nIndex[i] = nIndex[ti];
    nIndex[ti] = tmp;
  }
  int nLast = 0;
  for (i = 0; q < 60 && i < n; i++) {
    int x = query(nIndex[i]);
    int c = nMax - x;
    nLast = gcd(nLast, c);
  }
  return nLast;
}
int main() {
  srand(45648916);
  while (cin >> n) {
    q = 0;
    int i;
    for (i = 0; i < n; i++) nIndex[i] = i + 1;
    nMax = getMax();
    nD = getD();
    cout << "! " << nMax - (n - 1) * nD << " " << nD << endl;
  }
}
