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