#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
template <class T>
inline void ckmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void ckmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
using VI = vector<int>;
const int MAXN = 2048;
const long long SIZE = 1000000000LL * 1000000000LL;
int n;
long long L;
pair<long long, long long> ret[MAXN];
map<long long, long long> cache[MAXN];
long long real_query(int idx, long long pos) {
  printf("? %d %lld\n", idx + 1, pos);
  fflush(stdout);
  long long val;
  scanf("%lld", &val);
  return val;
}
long long query(int idx, long long pos) {
  auto it = cache[idx].find(pos);
  if (it != cache[idx].end()) return it->second;
  return cache[idx][pos] = real_query(idx, pos);
}
bool is_greator_or_equal(int idx, long long pos, long long limit) {
  auto &w = cache[idx];
  if (!w.count(pos)) {
    auto it = w.lower_bound(pos);
    if (it != w.end()) {
      if (it->second < limit) return false;
      if (it->second - abs(pos - it->first) >= limit) return true;
    }
    if (it != w.begin()) {
      --it;
      if (it->second >= limit) return true;
      if (it->second + abs(pos - it->first) < limit) return false;
    }
  }
  return query(idx, pos) >= limit;
}
void solve(long long sx, long long tx, long long sL, long long tL, VI a) {
  assert(tL - sL == ((int)a.size()));
  if (tL - sL == 1) {
    ret[a[0]] = make_pair(sx, tx);
    return;
  }
  long long mL = (sL + tL) / 2;
  long long low = sx - 1, high = tx;
  for (; low + 1 < high;) {
    long long mid = (low + high) / 2;
    int cnt = 0;
    int left_cnt = ((int)a.size());
    for (int idx : a) {
      if (is_greator_or_equal(idx, mid, L * mL)) ++cnt;
      --left_cnt;
      if (cnt >= ((int)a.size()) / 2) break;
      if (cnt + left_cnt < ((int)a.size()) / 2) break;
    }
    if (cnt >= ((int)a.size()) / 2)
      high = mid;
    else
      low = mid;
  }
  long long mx = high;
  sort(a.begin(), a.end(),
       [&](int idx1, int idx2) { return query(idx1, mx) > query(idx2, mx); });
  VI b, c;
  for (int i = 0; i < (((int)a.size())); ++i)
    if (i < mL - sL)
      b.push_back(a[i]);
    else
      c.push_back(a[i]);
  solve(sx, mx, sL, mL, b);
  solve(mx, tx, mL, tL, c);
}
int main() {
  scanf("%d%lld", &n, &L);
  L /= n;
  VI a;
  for (int i = 0; i < (n); ++i) a.push_back(i);
  solve(0, SIZE, 0, n, a);
  random_shuffle(a.begin(), a.end());
  printf("!\n");
  for (int i = 0; i < (n); ++i)
    printf("%lld %lld\n", ret[i].first, ret[i].second);
  fflush(stdout);
  return 0;
}
