#include <bits/stdc++.h>
using namespace std;
int n;
long long L;
long long func(int i, long long x) {
  printf("? %d %I64d\n", i, x);
  fflush(stdout);
  long long ans;
  scanf("%I64d", &ans);
  return ans;
}
long long _find(int i, long long val, long long lo, long long hi) {
  while (hi - lo > 1) {
    long long me = lo + hi >> 1;
    long long cur = func(i, me);
    if (cur == val)
      return me;
    else if (cur < val)
      lo = me;
    else
      hi = me;
  }
  return lo;
}
int id[1010], jd[1010];
long long le[1010], ri[1010];
int Rand(int up) { return (rand() << 15 | rand()) % up; }
long long _find(long long lo, long long hi, int le, int ri, int me,
                long long tar) {
  if (le == ri) return _find(id[le], tar, lo, hi);
  int cur = Rand(ri - le + 1) + le;
  assert(le <= cur && cur <= ri);
  int tle = le, tri = ri;
  long long pos = _find(id[cur], tar, lo, hi);
  vector<int> tmp;
  tmp.push_back(id[cur]);
  for (int i = le; i <= ri; i++) {
    if (i == cur) continue;
    long long now = func(id[i], pos);
    if (now > tar)
      jd[tle++] = id[i];
    else if (now < tar)
      jd[tri--] = id[i];
    else
      tmp.push_back(id[i]);
  }
  for (int i = 0; i < tmp.size(); i++) jd[tle + i] = tmp[i];
  for (int i = le; i <= ri; i++) id[i] = jd[i];
  if (tle > me)
    return _find(lo, pos + 1, le, tle - 1, me, tar);
  else if (tri < me)
    return _find(pos, hi, tle + 1, ri, me, tar);
  else
    return pos;
}
void solve(int l, int r, long long lo, long long hi) {
  if (l == r) {
    le[id[l]] = lo;
    ri[id[l]] = hi - 1;
    return;
  }
  int me = l + r >> 1;
  long long pos = _find(lo, hi, l, r, me, L * me);
  solve(l, me, lo, pos + 1);
  solve(me + 1, r, pos, hi);
}
int main() {
  cin >> n >> L;
  L /= n;
  long long up = 1e18;
  for (int i = 1; i <= n; i++) id[i] = i;
  solve(1, n, 0, up + 1);
  puts("!");
  for (int i = 1; i <= n; i++) printf("%I64d %I64d\n", le[i], ri[i]);
  return 0;
}
