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