#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  long long int n, m, k;
  vector<long long int> a, b;
  while (t--) {
    cin >> n >> m;
    cout << n << " " << n * 2 << "\n";
  }
  return 0;
}
