#include <bits/stdc++.h>
using namespace std;
int64_t modex(int64_t a, int64_t b, int64_t p) {
  int64_t res = 1;
  a %= p;
  while (b > 0) {
    if (b & 1) res = (res * a) % p;
    a = (a * a) % p;
    b >>= 1;
  }
  return res;
}
int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int64_t l, r;
    cin >> l >> r;
    cout << l << " " << int64_t(2 * l) << "\n";
  }
  return 0;
}
