#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1005;
int a[N], b[N], c[N];
ll n, len, val;
pair<ll, ll> ans[N];
inline ll query(ll a, ll b) {
  cout << "? " << a << ' ' << b << endl;
  ll ret;
  cin >> ret;
  return ret;
}
ll find(int x, ll kk, ll l, ll r) {
  ll mid = (l + r) >> 1;
  while (1) {
    ll y = query(x, mid);
    if (y == kk) return mid;
    if (y < kk)
      l = mid + 1;
    else
      r = mid - 1;
    mid = (l + r) >> 1;
  }
}
void kth(int l, int r, int kk, ll ql, ll qr) {
  if (l == r) return;
  int x = rand() % (r - l + 1) + l;
  ll y = find(a[x], (len / n) * kk, ql, qr);
  int l1 = l - 1, l2 = r + 1, l3 = 0;
  c[++l3] = a[x];
  for (int i = l; i <= r; i++) {
    if (i == x) continue;
    ll tt = query(a[i], y);
    if (tt < (len / n) * kk) b[--l2] = a[i];
    if (tt == (len / n) * kk) c[++l3] = a[i];
    if (tt > (len / n) * kk) b[++l1] = a[i];
  }
  while (l1 < kk && l3) b[++l1] = c[l3--];
  if (l1 == kk) {
    val = y;
    while (l3) b[--l2] = c[l3--];
    for (int i = l; i <= r; i++) a[i] = b[i];
    return;
  }
  if (l1 < kk) {
    for (int i = l; i <= r; i++) a[i] = b[i];
    return kth(l1 + 1, r, kk, ql, qr);
  }
  while (l3) b[--l2] = c[l3--];
  for (int i = l; i <= r; i++) a[i] = b[i];
  return kth(l, l1, kk, ql, qr);
}
void solve(int l, int r, ll ql, ll qr) {
  if (l == r) {
    ans[a[l]] = {ql, qr};
    return;
  }
  int mid = (l + r) >> 1;
  kth(l, r, mid, ql, qr);
  ll x = val;
  solve(l, mid, ql, x);
  solve(mid + 1, r, x, qr);
}
int main() {
  ios::sync_with_stdio(false);
  srand(time(0));
  cin >> n >> len;
  for (int i = 1; i <= n; i++) a[i] = i;
  solve(1, n, 0, 1000000000000000000);
  cout << "!\n";
  for (int i = 1; i <= n; i++)
    cout << ans[i].first << ' ' << ans[i].second << endl;
  return 0;
}
