#include <bits/stdc++.h>
int main() {
  long long int c = 0, n1, n2, i, mean;
  scanf("%lli", &c);
  for (i = 0; i < c; i++) {
    scanf("%lli %lli", &n1, &n2);
    if ((n1 * 2) <= n2) printf("%lli %lli\n", n1, n1 * 2);
  }
}
