#include <bits/stdc++.h>
using namespace std;
string S;
int N, M, A, B, sum, x, y, K;
bool cek[26];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> A >> B;
    cout << A << " " << 2 * A << '\n';
  }
}
