#include <bits/stdc++.h>
using VI = std::vector<int>;
using VS = std::vector<std::string>;
using SS = std::stringstream;
using namespace std;
int main(int argc, char** argv) {
  int T;
  cin >> T;
  for (int i(0); i < T; i++) {
    long l, r;
    cin >> l >> r;
    cout << l << " " << 2 * l << "\n";
  }
  return 0;
}
