#include <bits/stdc++.h>
using namespace std;
int const N = 1000;
long long const inf = 1000000000000000000;
int n;
long long L;
pair<long long, long long> an[N + 1];
vector<int> o{0};
map<long long, long long> dp[N + 1];
long long ask(int i, long long x) {
  auto it = dp[i].find(x);
  if (it != dp[i].end()) return it->second;
  printf("? %d %lld\n", i, x);
  fflush(stdout);
  long long an;
  scanf("%lld", &an);
  return dp[i][x] = an;
}
long long gt(int i, long long x, long long l, long long r) {
  while (r > l) {
    long long m = l + r >> 1;
    if (ask(i, m) < x)
      l = m + 1;
    else
      r = m;
  }
  return l;
}
void go(vector<int> const &v, long long l = 0, long long r = inf, int nl = 1,
        int nr = n) {
  if (v.size() == 1) {
    an[v[0]].second = r;
    o.push_back(v[0]);
    return;
  }
  int m = nl + nr >> 1;
  long long w = L / n * m, t;
  vector<int> vl, vr, c(v);
  while (!c.empty()) {
    int i = rand() % c.size(), cl = 0, cr = 0;
    t = gt(c[i], w, l, r);
    for (int u : c) {
      long long z = ask(u, t);
      if (z < w)
        ++cl;
      else if (z > w)
        ++cr;
    }
    bool kll = false, klr = false;
    if (cl + vl.size() <= nr - m && cr + vr.size() <= m + 1 - nl) {
      kll = true;
      klr = true;
    } else if (cl + vl.size() > nr - m)
      klr = true;
    else
      kll = true;
    for (int &u : c) {
      long long z = ask(u, t);
      if (z < w && kll)
        vl.push_back(u), u = 0, --cl;
      else if (z > w && klr)
        vr.push_back(u), u = 0, --cr;
      else if (z == w) {
        if (kll && klr) {
          if (cl + vl.size() < nr - m)
            vl.push_back(u);
          else
            vr.push_back(u);
        } else if (kll)
          vl.push_back(u);
        else
          vr.push_back(u);
        u = 0;
      }
    }
    for (int i = 0; i < (int)(c.size()); ++i)
      if (c[i] == 0) {
        swap(c[i], c.back());
        c.pop_back();
        --i;
      }
  }
  go(vr, l, t, nl, m);
  go(vl, t + 1, r, m + 1, nr);
}
int main() {
  srand(time(0));
  scanf("%d%lld", &n, &L);
  vector<int> v(n);
  for (int i = 1; i < (int)(n + 1); ++i) v[i - 1] = i;
  go(v);
  for (int i = 1; i < (int)(n + 1); ++i) an[o[i]].first = an[o[i - 1]].second;
  printf("!\n");
  for (int i = 1; i < (int)(n + 1); ++i)
    printf("%lld %lld\n", an[i].first, an[i].second);
}
