#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(20030102);
long long query(int id, long long x) {
  printf("? %d %lld\n", id, x);
  fflush(stdout);
  long long ret;
  scanf("%lld", &ret);
  return ret;
}
int n;
long long lres[1010], rres[1010];
long long L;
long long get(int id, long long vl) {
  long long L = 0, R = 1000000000000000000, pos = -1;
  while (L <= R) {
    long long mid = (L + R) >> 1;
    if (query(id, mid) >= vl)
      pos = mid, R = mid - 1;
    else
      L = mid + 1;
  }
  return pos;
}
pair<int, long long> getkth(vector<int> dat, int K, long long mpos) {
  int p = rnd() % dat.size();
  long long pos = get(dat[p], mpos);
  vector<int> ls, rs, ms;
  for (int i = 0; i < dat.size(); i++) {
    if (i == p) continue;
    long long c = query(dat[i], pos);
    if (c == mpos)
      ms.push_back(dat[i]);
    else if (c > mpos)
      ls.push_back(dat[i]);
    else
      rs.push_back(dat[i]);
  }
  while (ls.size() < K - 1 && !ms.empty()) {
    ls.push_back(ms.back());
    ms.pop_back();
  }
  while (!ms.empty()) {
    rs.push_back(ms.back());
    ms.pop_back();
  }
  if (ls.size() == K - 1)
    return make_pair(dat[p], pos);
  else if (ls.size() < K - 1)
    return getkth(rs, K - ls.size() - 1, mpos);
  else
    return getkth(ls, K, mpos);
}
void solve(vector<int> s, long long l, long long r, long long lv) {
  if (s.size() == 1) {
    lres[s.front()] = l;
    rres[s.front()] = r;
    return;
  }
  long long midv = lv + (L / n) * (s.size() / 2);
  pair<int, long long> mm = getkth(s, s.size() / 2, midv);
  vector<int> ls, rs, ms;
  for (int i = 0; i < s.size(); i++) {
    long long c = query(s[i], mm.second);
    if (c > midv)
      ls.push_back(s[i]);
    else if (c == midv)
      ms.push_back(s[i]);
    else
      rs.push_back(s[i]);
  }
  while (ls.size() < s.size() / 2) {
    ls.push_back(ms.back());
    ms.pop_back();
  }
  while (!ms.empty()) {
    rs.push_back(ms.back());
    ms.pop_back();
  }
  solve(ls, l, mm.second, lv);
  solve(rs, mm.second, r, midv);
}
int main() {
  scanf("%d%lld", &n, &L);
  vector<int> res(n);
  iota(res.begin(), res.end(), 1);
  solve(res, 0, 1000000000000000000, 0);
  puts("!");
  for (int i = 1; i <= n; i++) printf("%lld %lld\n", lres[i], rres[i]);
  return 0;
}
