#include <bits/stdc++.h>
using namespace std;
long long n, L, q[1005], q1[1005], q2[1005], q3[1005], q1_cnt, q2_cnt, q3_cnt,
    ansl[1005], ansr[1005], rec;
void work(long long ql, long long qr, long long level, long long tar,
          long long nl, long long nr) {
  if (ql > qr) return;
  q1_cnt = q2_cnt = q3_cnt = 0;
  long long w = ql + rand() % (qr - ql + 1);
  long long l = nl, r = nr;
  while (l <= r) {
    long long mid = l + r >> 1;
    cout << '?' << ' ' << q[w] << ' ' << mid << endl;
    long long val;
    cin >> val;
    if (val >= level)
      r = mid - 1;
    else
      l = mid + 1;
  }
  rec = l;
  q2[++q2_cnt] = q[w];
  for (long long i = ql; i <= qr; i++)
    if (i != w) {
      cout << '?' << ' ' << q[i] << ' ' << l << endl;
      long long val;
      cin >> val;
      if (val < level)
        q3[++q3_cnt] = q[i];
      else if (val > level)
        q1[++q1_cnt] = q[i];
      else
        q2[++q2_cnt] = q[i];
    }
  for (long long i = 1; i <= q1_cnt; i++) q[ql + i - 1] = q1[i];
  for (long long i = 1; i <= q2_cnt; i++) q[ql + q1_cnt + i - 1] = q2[i];
  for (long long i = 1; i <= q3_cnt; i++)
    q[ql + q1_cnt + q2_cnt + i - 1] = q3[i];
  if (tar >= ql + q1_cnt && tar < ql + q1_cnt + q2_cnt) return;
  if (tar < ql + q1_cnt)
    work(ql, ql + q1_cnt - 1, level, tar, nl, nr);
  else
    work(ql + q1_cnt + 1, qr, level, tar, nl, nr);
}
void solve(long long nl, long long nr, long long low, long long top,
           long long ql, long long qr) {
  if (ql == qr) {
    ansl[q[ql]] = nl;
    ansr[q[qr]] = nr;
    return;
  }
  long long cnt = qr - ql + 1 >> 1, level = low + L / n * cnt;
  work(ql, qr, level, ql + cnt - 1, nl, nr);
  long long tmp = rec;
  solve(nl, tmp, low, level, ql, ql + cnt - 1);
  solve(tmp, nr, level, top, ql + cnt, qr);
}
signed main() {
  srand(time(NULL));
  cin >> n >> L;
  for (long long i = 1; i <= n; i++) q[i] = i;
  solve(0, 1e18, 0, L, 1, n);
  cout << '!' << '\n';
  for (long long i = 1; i <= n; i++) cout << ansl[i] << ' ' << ansr[i] << '\n';
  return 0;
}
