#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int l[n], r[n];
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
  }
  for (int i = 0; i < n; i++) {
    cout << l[i] << " " << 2 * l[i] << endl;
  }
  return 0;
}
