#include <bits/stdc++.h>
using namespace std;
const long long S = (long long)1e18;
long long n, L, p[2005], ansl[2005], ansr[2005], s1[2005], s2[2005], s3[2005];
long long rd() {
  long long x = 0, tp = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') tp = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10 + c - '0');
    c = getchar();
  }
  return x * tp;
}
long long query(long long id, long long x) {
  printf("? %lld %lld\n", id, x);
  fflush(stdout);
  long long res;
  scanf("%lld", &res);
  return res;
}
long long getpos(long long id, long long x) {
  long long l = 0, r = S, mid, pos = 0;
  while (l < r) {
    mid = (l + r) >> 1;
    if (query(id, mid) >= x)
      r = mid;
    else
      l = mid + 1;
  }
  return l;
}
long long get_kth(long long l, long long r, long long K) {
  long long pos, val, i, W, nvl, t1, t2, t3, top;
  pos = rand() % (r - l + 1) + l;
  W = L / n * K;
  val = getpos(p[pos], W);
  t1 = t2 = t3 = 0;
  for (i = l; i <= r; i++) {
    nvl = query(p[i], val);
    if (nvl > W)
      s1[++t1] = p[i];
    else if (nvl == W)
      s2[++t2] = p[i];
    else
      s3[++t3] = p[i];
  }
  top = l;
  for (i = 1; i <= t1; i++) p[top++] = s1[i];
  for (i = 1; i <= t2; i++) p[top++] = s2[i];
  for (i = 1; i <= t3; i++) p[top++] = s3[i];
  if (t1 > K - l)
    return get_kth(l, l + t1 - 1, K);
  else if (t3 > r - K)
    return get_kth(r - t3 + 1, r, K);
  else
    return val;
}
void solve(long long l, long long r, long long sl, long long sr) {
  if (l == r) {
    ansl[p[l]] = sl, ansr[p[r]] = sr;
    return;
  }
  long long k = (l + r) >> 1, mid;
  mid = get_kth(l, r, k);
  solve(l, k, sl, mid), solve(k + 1, r, mid, sr);
}
int main() {
  scanf("%lld %lld", &n, &L);
  for (int i = 1; i <= n; i++) p[i] = i;
  solve(1, n, 0, S);
  printf("!\n");
  for (int i = 1; i <= n; i++) printf("%lld %lld\n", ansl[i], ansr[i]);
  fflush(stdout);
  return 0;
}
