#include <bits/stdc++.h>
using namespace std;
void open(const char *s) {}
void open2(const char *s) {}
template <class T>
int upmin(T &a, const T &b) {
  return (b < a ? a = b, 1 : 0);
}
template <class T>
int upmax(T &a, const T &b) {
  return (b > a ? a = b, 1 : 0);
}
namespace io {
const int SIZE = (1 << 20) + 1;
char ibuf[SIZE], *iS, *iT;
char obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1;
int getc() {
  (iS == iT ? iS = ibuf, iT = ibuf + fread(ibuf, 1, SIZE, stdin) : 0);
  return iS == iT ? EOF : *(iS++);
}
int f;
char c;
template <class T>
void get(T &x) {
  f = 1;
  for (c = getc(); (c < '0' || c > '9') && c != '-'; c = getc())
    ;
  (c == '-' ? f = -1, c = getc() : 0);
  x = 0;
  for (; c >= '0' && c <= '9'; c = getc()) x = x * 10 + c - '0';
  x *= f;
}
void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
void putc(char x) {
  *(oS++) = x;
  if (oS == oT) flush();
}
int a[55], t;
template <class T>
void put(T x) {
  if (!x) putc('0');
  x < 0 ? putc('-'), x = -x : 0;
  while (x) {
    a[++t] = x % 10;
    x /= 10;
  }
  while (t) putc(a[t--] + '0');
}
void space() { putc(' '); }
void enter() { putc('\n'); }
struct flusher {
  ~flusher() { flush(); }
} io_flusher;
}  // namespace io
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int times = 0;
int ask1(int x) {
  times++;
  printf("? %d\n", x);
  fflush(stdout);
  scanf("%d", &x);
  return x;
}
int ask2(int x) {
  times++;
  printf("> %d\n", x);
  fflush(stdout);
  scanf("%d", &x);
  return x;
}
int main() {
  int n;
  scanf("%d", &n);
  int l = 0, r = 1e9;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (ask2(mid))
      l = mid + 1;
    else
      r = mid;
  }
  int d = 0;
  srand(time(0));
  while (times < 60)
    d = gcd(d, l - ask1(((long long)rand() * RAND_MAX + rand()) % n + 1));
  printf("! %d %d\n", l - d * (n - 1), d);
  return 0;
}
