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