#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
const long long X = 1e18;
int n;
long long L, l[N], r[N], F[N][N], lst;
long long f(int i, long long x) {
  cout << '?' << ' ' << i << ' ' << x << endl;
  long long y;
  cin >> y;
  return y;
}
long long bin(int i, long long l, long long r, long long v) {
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (f(i, mid) < v)
      l = mid + 1;
    else
      r = mid;
  }
  return l;
}
vector<int> kth(vector<int> q, long long lx, long long rx, long long y, int k) {
  int i = q[rand() % int(q.size())];
  long long x = bin(i, lx, rx, y);
  assert(f(i, lx) <= y && y <= f(i, rx));
  assert(f(i, x) == y);
  vector<int> ls, rs, now;
  for (auto i : q) {
    long long v = f(i, x);
    if (v == y)
      now.push_back(i);
    else if (v > y)
      ls.push_back(i);
    else
      rs.push_back(i);
  }
  vector<int> ret;
  if (int(ls.size()) >= k) {
    assert(int(ls.size()) < int(q.size()));
    ret = kth(ls, lx, rx, y, k);
    ret.insert(ret.end(), now.begin(), now.end());
    ret.insert(ret.end(), rs.begin(), rs.end());
  } else if (int(ls.size()) + int(now.size()) >= k) {
    lst = x;
    ret = ls;
    ret.insert(ret.end(), now.begin(), now.end());
    ret.insert(ret.end(), rs.begin(), rs.end());
  } else {
    assert(int(rs.size()) < int(q.size()));
    ret = ls;
    ret.insert(ret.end(), now.begin(), now.end());
    rs = kth(rs, lx, rx, y, k - int(ls.size()) - int(now.size()));
    ret.insert(ret.end(), rs.begin(), rs.end());
  }
  return ret;
}
void solve(vector<int> q, long long lx, long long rx, int o) {
  if (int(q.size()) == 1) {
    l[q[0]] = lx;
    r[q[0]] = rx;
    return;
  }
  int mid = int(q.size()) / 2;
  lst = -1;
  q = kth(q, lx, rx, L / n * (o + mid), mid);
  assert(lst >= 0);
  long long x = lst;
  solve(vector<int>(q.begin(), q.begin() + mid), lx, x, o);
  solve(vector<int>(q.begin() + mid, q.end()), x, rx, o + mid);
}
int main() {
  srand(114514);
  cin >> n >> L;
  vector<int> q(n);
  for (int i = 0; i < n; i++) q[i] = i + 1;
  solve(q, 0, X, 0);
  for (int i = 1; i <= n; i++) assert(f(i, r[i]) - f(i, l[i]) >= L / n);
  puts("!");
  for (int i = 1; i <= n; i++) cout << l[i] << ' ' << r[i] << endl;
  return 0;
}
