#include <bits/stdc++.h>
using namespace std;
int f(int a, int b) {
  if (b == 0) {
    return a;
  }
  return f(b, a % b);
}
int main() {
  srand(time(0));
  int n;
  cin >> n;
  int l = 0;
  int r = 1e9;
  int ans;
  int cnt = 0;
  while (r - l > 1) {
    int m = (l + r) / 2;
    cout << "> " << m << endl;
    cnt++;
    cin >> ans;
    if (ans) {
      l = m;
    } else {
      r = m;
    }
  }
  int mx = r;
  int a1, a2;
  cout << "? " << 1 << endl;
  cin >> a1;
  cout << "? " << 2 << endl;
  cin >> a2;
  cnt += 2;
  int d = abs(a1 - a2);
  int a0;
  srand(time(0));
  while (cnt < 60) {
    cout << "? " << (long long)(rand() * RAND_MAX + rand()) % n + 1 << endl;
    cnt++;
    cin >> a0;
    if (a0 != mx) d = f(d, abs(a0 - mx));
    if (d == 1) cnt = 67;
  }
  cout << "! " << mx - (n - 1) * d << " " << d << endl;
  return 0;
}
