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