#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.141592653;
const long long mod = 1e9 + 7;
const long long N = 1e6 + 500;
const int big = 1e9 + 1;
const long long INF = 1e18 + 1;
int n;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x, y;
    cin >> x >> y;
    cout << x << " " << x + x << endl;
  }
  return 0;
}
