#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 0;
  scanf("%d", &t);
  for (int qwe = 0; qwe < t; qwe++) {
    long long r = 0, l = 0, y = 0;
    scanf("%lld%lld", &l, &r);
    printf("%lld %lld\n", l, l * 2);
  }
  return 0;
}
