#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int l, r;
    cin >> l >> r;
    cout << l << " " << l * 2 << endl;
  }
  return 0;
}
