#include <bits/stdc++.h>
using namespace std;
constexpr long long INF = (1ll << 60);
long long mod = 1000000007;
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
void pt(T val) {
  cout << val << "\n";
}
template <typename T>
void pt_vll(vector<T> &v) {
  long long vs = v.size();
  for (long long i = 0; i < vs; ++i) {
    cout << v[i];
    if (i == vs - 1)
      cout << "\n";
    else
      cout << " ";
  }
}
template <typename T>
void pt_vvll(vector<vector<T>> &v) {
  long long vs = v.size();
  for (long long i = 0; i < vs; ++i) pt_vll(v[i]);
}
template <typename X, typename Y>
void pt_pair(pair<X, Y> val) {
  cout << val.first << " " << val.second << "\n";
}
template <typename X, typename Y>
void pt_vpair(vector<pair<X, Y>> &v) {
  for (long long i = 0; i < v.size(); ++i) pt_pair(v[i]);
}
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long modpow(long long x, long long n) {
  long long ret = 1;
  if (x < 0) return 0ll;
  while (n > 0) {
    if (n & 1) ret = ret * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return ret;
}
long long minv(long long a, long long m) { return modpow(a, m - 2); }
void pre_process(vector<long long> &a, vector<long long> &s) {
  long long n = (long long)a.size();
  s.assign(n + 1, 0);
  for (long long i = 0; i < n; i++) {
    s[i + 1] = s[i] + a[i];
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t;
  cin >> t;
  while (t--) {
    long long l, r;
    cin >> l >> r;
    cout << l << " " << 2 * l << "\n";
  }
  return 0;
}
