#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a) swap(a, b %= a);
  return b;
}
int q = 0;
int ask(char c, int v) {
  q++;
  assert(q <= 60);
  cout << c << ' ' << v << '\n';
  cout.flush();
  int ans;
  cin >> ans;
  return ans;
}
int main() {
  int n;
  cin >> n;
  int p = n - 1, pas = (1 << 30);
  while (pas) {
    if (p + pas <= (int)1e9 && ask('>', p + pas - 1) == 1) p += pas;
    pas /= 2;
  }
  int g = 0;
  mt19937 seed((long long)(new char));
  uniform_int_distribution<int> rnd(1, n);
  while (q < 60) g = gcd(g, p - ask('?', rnd(seed)));
  cout << "! " << p - g * (n - 1) << ' ' << g << '\n';
  cout.flush();
  return 0;
}
