#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAX = 1000005;
int SetBit(int n, int x) { return n | (1 << x); }
int ClearBit(int n, int x) { return n & ~(1 << x); }
int ToggleBit(int n, int x) { return n ^ (1 << x); }
bool CheckBit(int n, int x) { return (bool)(n & (1 << x)); }
int main(void) {
  int tc, l, r;
  scanf("%d", &tc);
  while (tc--) {
    scanf("%d %d", &l, &r);
    printf("%d %d\n", l, l + l);
  }
  return 0;
}
