#include <bits/stdc++.h>
using namespace std;
int n, ans, x;
vector<int> v;
inline int rand() {
  static int seed = 20050915;
  return seed = (((seed * 19260817ll % 2147483647) ^ 998244353) + 1000000007) %
                2147483647;
}
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  scanf("%d", &n);
  int l = 0, r = 1e9, mid;
  while (l < r) {
    mid = l + r >> 1;
    printf("> %d\n", mid);
    fflush(stdout);
    scanf("%d", &x);
    if (x)
      l = mid + 1;
    else
      r = mid;
  }
  v.push_back(l);
  for (register int i = 1; i <= 30; i++) {
    printf("? %d\n", rand() % n + 1);
    fflush(stdout);
    scanf("%d", &x);
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  ans = v[1] - v[0];
  for (register int i = 2; i < 30; i++) ans = gcd(ans, v[i] - v[i - 1]);
  printf("! %d %d", l - (n - 1) * ans, ans);
}
