#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  int l[t], r[t], x[t], y[t];
  for (int i = 0; i < t; i++) {
    scanf("%d %d", &l[i], &r[i]);
    x[i] = l[i];
    y[i] = 2 * l[i];
  }
  for (int i = 0; i < t; i++) {
    printf("%d %d\n", x[i], y[i]);
  }
}
