#include <bits/stdc++.h>
using namespace std;
int seg_size(int n) { return (1 << (int)(ceil(log2(n)) + 1)) - 1; }
const long long mod = (long long)1e+9 + 7;
const long long inf = (long long)1e+18 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long l, r;
    cin >> l >> r;
    long long rr = 2 * l;
    cout << l << ' ' << rr << "\n";
  }
  return 0;
}
