#include <bits/stdc++.h>
using namespace std;
const long long SEED = chrono::steady_clock::now().time_since_epoch().count();
mt19937_64 rng = mt19937_64(SEED);
inline long long rnd(const long long& a, const long long& b) {
  return uniform_int_distribution<long long>(a, b)(rng);
}
vector<pair<long long, long long> > ans;
long long n, L;
map<pair<int, long long>, long long> vv;
long long valueAt(int i, long long x) {
  if (vv.count({i, x}) == 0) {
    cout << "? " << i << " " << x << endl;
    long long res;
    cin >> res;
    vv[{i, x}] = res;
  }
  return vv[{i, x}];
}
long long getX(const int& i, long long l, long long h, long long v) {
  long long lg = 0;
  while (l <= h) {
    long long m = (l + h) / 2;
    long long x = valueAt(i, m);
    if (x < v) {
      lg = m;
      l = m + 1;
    } else {
      h = m - 1;
    }
  }
  return lg + 1;
}
long long splitPoint;
pair<vector<int>, vector<int> > splitInto(vector<int>& fun, long long lx,
                                          long long hx, long long ly,
                                          long long hy, long long my, int k) {
  int rPos = rnd(0, fun.size() - 1);
  long long x = getX(fun[rPos], lx, hx, my);
  vector<int> l, e, h;
  for (int i = 0; i < fun.size(); i++) {
    long long va = valueAt(fun[i], x);
    if (va < my) l.push_back(fun[i]);
    if (va == my) e.push_back(fun[i]);
    if (va > my) h.push_back(fun[i]);
  }
  while (e.size() > 0 && l.size() < k) {
    l.push_back(e.back());
    e.pop_back();
  }
  while (e.size() > 0) {
    h.push_back(e.back());
    e.pop_back();
  }
  if (l.size() > k) {
    auto pr = splitInto(l, x, hx, ly, hy, my, k);
    l = pr.first;
    for (auto a : pr.second) h.push_back(a);
  } else if (l.size() < k) {
    auto pr = splitInto(h, lx, x, ly, hy, my, k - l.size());
    h = pr.second;
    for (auto a : pr.first) l.push_back(a);
  } else
    splitPoint = x;
  return {l, h};
}
void solve(vector<int>& fun, long long lx, long long hx, long long ly,
           long long hy) {
  if (fun.size() == 0) return;
  if (fun.size() == 1) {
    ans[fun[0] - 1] = {lx, hx};
    return;
  }
  long long split = fun.size() / 2;
  long long my = ly + split * (L / n);
  pair<vector<int>, vector<int> > pr;
  if (fun.size() % 2 == 0)
    pr = splitInto(fun, lx, hx, ly, hy, my, split);
  else
    pr = splitInto(fun, lx, hx, ly, hy, my, split + 1);
  vector<int> fl = move(pr.second);
  vector<int> fr = move(pr.first);
  long long p = splitPoint;
  solve(fl, lx, p, ly, my);
  solve(fr, p, hx, my, hy);
}
int32_t main(int argv, char** argc) {
  ios::sync_with_stdio(false);
  cin >> n >> L;
  ans.resize(n);
  vector<int> fun;
  for (int i = 0; i < n; i++) fun.push_back(i + 1);
  shuffle(fun.begin(), fun.end(), rng);
  solve(fun, 0, 1e18, 0, L);
  cout << "!\n";
  for (auto a : ans) cout << a.first << " " << a.second << "\n";
  cout << endl;
}
