#include <bits/stdc++.h>
using namespace std;
mt19937 rnd;
long long T;
long long ask(int x, long long y) {
  printf("? %d %lld\n", x, y);
  fflush(stdout);
  scanf("%lld", &y);
  return y;
}
long long query(int x, int d, long long l, long long r) {
  while (l < r) {
    long long m = ((l + r) >> 1);
    if (ask(x, m) >= d * T)
      r = m;
    else
      l = m + 1;
  }
  return l;
}
int a[1005];
long long pos[1005], val;
void getkth(int l, int r, int k, int mid, long long nl, long long nr) {
  static int q1[1005], q2[1005], q3[1005];
  int x = l + rnd() % (r - l + 1);
  long long v = query(a[x], mid, nl, nr);
  int s1 = 0, s2 = 0, s3 = 0;
  q2[++s2] = a[x];
  for (int i = l; i <= r; i++)
    if (i != x) {
      long long t = ask(a[i], v);
      if (t > mid * T)
        q1[++s1] = a[i];
      else if (t < mid * T)
        q3[++s3] = a[i];
      else
        q2[++s2] = a[i];
    }
  for (int i = 1; i <= s1; i++) a[l + i - 1] = q1[i];
  for (int i = 1; i <= s2; i++) a[l + s1 + i - 1] = q2[i];
  for (int i = 1; i <= s3; i++) a[l + s1 + s2 + i - 1] = q3[i];
  if (s1 >= k)
    getkth(l, l + s1 - 1, k, mid, nl, v);
  else if (s1 + s2 < k)
    getkth(l + s1 + s2, r, k - s1 - s2, mid, v, nr);
  else
    val = v;
}
void solve(int l, int r, long long nl, long long nr) {
  if (l == r) {
    pos[l] = query(a[l], l, nl, nr);
    return;
  }
  int m = ((l + r) >> 1);
  getkth(l, r, m - l + 1, m, nl, nr);
  long long t = val;
  solve(l, m, nl, t);
  solve(m + 1, r, t, nr);
}
pair<long long, long long> ans[1005];
int main() {
  int n;
  scanf("%d%lld", &n, &T);
  T /= n;
  for (int i = 1; i <= n; i++) a[i] = i;
  solve(1, n, 1, 1e18);
  for (int i = 1; i <= n; i++)
    ans[a[i]] = pair<long long, long long>(pos[i - 1], pos[i]);
  puts("!");
  for (int i = 1; i <= n; i++)
    printf("%lld %lld\n", ans[i].first, ans[i].second);
  fflush(stdout);
  return 0;
}
