#include <bits/stdc++.h>
using namespace std;
bool mark[1000005];
int gcd(int a, int b) {
  int k;
  while (a % b) {
    k = a % b;
    a = b;
    b = k;
  }
  return b;
}
int Rand() {
  int res = 0;
  for (int i = 30; i >= 0; i--) res += ((rand() & 1) << i);
  return res;
}
int main(void) {
  int data[65];
  int diff = 0, _count = 0, buffer, number, temp, mid, low = 0,
      high = 1000000000;
  cin >> number;
  while (low < high) {
    mid = (low + high) / 2;
    cout << "> " << mid << endl;
    fflush(stdout);
    cin >> buffer;
    if (buffer)
      low = mid + 1;
    else
      high = mid;
    _count++;
  }
  srand(time(NULL));
  _count = min(number, 60 - _count);
  for (int i = 1; i <= _count; i++) {
    temp = Rand() % number + 1;
    while (mark[temp]) temp = Rand() % number + 1;
    mark[temp] = true;
    cout << "? " << temp << endl;
    fflush(stdout);
    cin >> data[i];
  }
  sort(data + 1, data + _count + 1);
  for (int i = 1; i < _count; i++) diff = gcd(diff, abs(data[i + 1] - data[i]));
  cout << "! " << low - (number - 1) * diff << " " << diff << endl;
  fflush(stdout);
  return 0;
}
