#include <bits/stdc++.h>
using namespace std;
namespace zyt {
const int N = 1e6 + 10;
int arr[60], cnt, id[N];
struct _rand {
  int operator()(const int n) {
    static int tmp = time(0);
    return tmp = (tmp + 125367909860563LL) % n;
  }
} rand;
int gcd(const int a, const int b) { return b ? gcd(b, a % b) : a; }
int work() {
  ios::sync_with_stdio(false);
  int n, num = 0;
  cin >> n;
  int l = 0, r = 1e9, ans;
  while (l <= r) {
    int mid = (l + r) >> 1, tmp;
    cout << "> " << mid << endl;
    ++num;
    cin >> tmp;
    if (tmp)
      l = mid + 1;
    else
      r = mid - 1, ans = mid;
  }
  for (int i = 1; i <= n; i++) id[i] = i;
  random_shuffle(id + 1, id + 1 + n, rand);
  while (num < 60 && cnt < n) {
    cout << "? " << id[cnt + 1] << endl;
    cin >> arr[cnt++];
    ++num;
  }
  sort(arr, arr + cnt);
  int d = arr[1] - arr[0];
  for (int i = 2; i < cnt; i++) d = gcd(d, arr[i] - arr[i - 1]);
  cout << "! " << ans - (n - 1) * d << ' ' << d << endl;
  return 0;
}
}  // namespace zyt
int main() { return zyt::work(); }
