#include <bits/stdc++.h>
using namespace std;
class DebugStream {
} LOG;
template <typename T>
DebugStream &operator<<(DebugStream &s, const T &) {
  return s;
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 1e3 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
const long long MVV = 1e18;
pair<long long, long long> ans[maxN];
long long L, U;
int n, ind[maxN];
map<long long, long long> memo[maxN];
void assertion(bool x) {
  if (!x) exit(0);
}
int qcount;
long long query(int w, long long x) {
  if (memo[w].find(x) == memo[w].end()) {
    assertion(qcount < 200000);
    qcount++;
    cout << "? " << w + 1 << ' ' << x << '\n';
    cout.flush();
    long long resp;
    cin >> resp;
    memo[w][x] = resp;
  }
  return memo[w][x];
}
long long bins(int w, long long targ) {
  long long le = -1, ri = MVV, mi;
  while (le + 1 < ri) {
    mi = (le + ri) / 2;
    if (query(w, mi) >= targ)
      ri = mi;
    else
      le = mi;
  }
  return ri;
}
void solve(int *arr, int n, long long le, long long ri, int acu) {
  if (n == 1) return void(ans[*arr] = pair<long long, long long>(le, ri));
  int *one = arr, *two = arr + n, *mid;
  long long cr;
  while (one != arr + n / 2) {
    cr = bins(*(two - 1), (acu + n / 2) * U);
    mid = stable_partition(
        one, two, [&](int x) { return query(x, cr) >= (acu + n / 2) * U; });
    if (mid <= arr + n / 2) {
      one = mid;
      continue;
    }
    mid = stable_partition(one, mid, [&](int x) {
      return query(x, cr) > (acu + n / 2) * U ||
             query(x, cr - 1) != (acu + n / 2) * U - 1;
    });
    if (mid <= arr + n / 2)
      break;
    else
      two = mid;
  }
  solve(arr, n / 2, le, cr, acu);
  solve(arr + n / 2, n - n / 2, cr, ri, acu + n / 2);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> L;
  U = L / n;
  iota(ind, ind + n, 0);
  int *ptr = ind + n;
  shuffle(ind, ind + n, rnd);
  solve(ind, n, 0, MVV, 0);
  cout << "!\n";
  for (int i = 0; i < n; i++)
    cout << ans[i].first << ' ' << ans[i].second << '\n';
  LOG << n << ' ' << qcount << '\n';
}
