#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 10e4;
const long long mn = 0;
const long long mx = 10e17;
long long sz, n, m, a, b;
long long cnt, ans;
string s;
vector<long long> v, v1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    cout << a << " " << a * 2 << endl;
  }
}
