#include <bits/stdc++.h>
using namespace std;
int _gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return b == 0 ? a : _gcd(b, a % b);
}
int N;
vector<int> A;
int B[60];
bool C[1000002];
int random_generate() { return (rand() * rand()) % N; }
int main() {
  srand(123120182);
  cin >> N;
  if (N <= 60) {
    for (int i = 0; i < N; i++) {
      cout << "? " << i + 1 << endl;
      cout.flush();
      cin >> B[i];
    }
    sort(B, B + N);
    cout << "! " << B[0] << ' ' << B[1] - B[0] << endl;
    cout.flush();
    return 0;
  }
  int lo = 0, hi = 1E9;
  int numquery = 60;
  while (lo + 1 < hi) {
    int mid = (lo + hi) / 2;
    numquery--;
    cout << "> " << mid << endl;
    cout.flush();
    bool r;
    cin >> r;
    if (r)
      lo = mid;
    else
      hi = mid;
  }
  A.push_back(lo + 1);
  while (numquery--) {
    int idx = random_generate();
    if (C[idx]) idx = random_generate();
    C[idx] = true;
    cout << "? " << idx + 1 << endl;
    cout.flush();
    cin >> idx;
    A.push_back(idx);
  }
  int ans = 0;
  int M = A.size();
  for (int i = 0; i < M; i++) {
    for (int j = 0; j < i; j++) {
      ans = _gcd(ans, abs(A[i] - A[j]));
    }
  }
  cout << "! " << lo + 1 - (N - 1) * ans << ' ' << ans << endl;
  cout.flush();
  return 0;
}
