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