#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, a, b, c, d;
  long long int t;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    c = a * 2;
    cout << a << " " << c << endl;
  }
  return 0;
}
