#include <bits/stdc++.h>
template <typename T>
inline T gcd(T a, T b) {
  T c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
template <typename T>
T lcm(T a, T b) {
  return b * (a / gcd(a, b));
}
template <typename T>
inline T pow2(T base, T n) {
  T ansp = 1;
  while (n) {
    if (n & 1) ansp *= base;
    n >>= 1;
    base *= base;
  }
  return ansp;
}
using namespace std;
bool sortbyf(const long long &a, const long long &b) { return (a > b); }
bool sortbys(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
int main() {
  long long q, l, r;
  scanf("%lld", &q);
  while (q--) {
    scanf("%lld", &l);
    scanf("%lld", &r);
    printf("%lld %lld\n", l, l * 2);
  }
  return 0;
}
