#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t, l, r;
  cin >> t;
  while (t--) {
    cin >> l >> r;
    cout << l << " " << 2 * l << '\n';
  }
  return 0;
}
