#include <bits/stdc++.h>
using namespace std;
int main() {
  int z;
  cin >> z;
  for (int i = 0; i < z; i++) {
    int a, b;
    cin >> a >> b;
    cout << (a) << " " << (a * 2) << '\n';
  }
  return 0;
}
