You are given a range of positive integers from $l$ to $r$.

Find such a pair of integers $(x, y)$ that $l \le x, y \le r$, $x \ne y$ and $x$ divides $y$.

If there are multiple answers, print any of them.

You are also asked to answer $T$ independent queries.


-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 1000$) — the number of queries.

Each of the next $T$ lines contains two integers $l$ and $r$ ($1 \le l \le r \le 998244353$) — inclusive borders of the range.

It is guaranteed that testset only includes queries, which have at least one suitable pair.


-----Output-----

Print $T$ lines, each line should contain the answer — two integers $x$ and $y$ such that $l \le x, y \le r$, $x \ne y$ and $x$ divides $y$. The answer in the $i$-th line should correspond to the $i$-th query from the input.

If there are multiple answers, print any of them.


-----Example-----
Input
3
1 10
3 14
1 10

Output
1 7
3 9
5 10

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation

Greedy algorithms


Solutions:
T = int(input())
for ks in range(T):
	(l, r) = map(int, input().split())
	print(l, 2 * l)


n = int(input())
for i in range(n):
	(l, r) = map(int, input().split())
	print(l, 2 * l)


number = int(input())
L = []
for i in range(number):
	L.append(input().split())
for i in range(number):
	for j in range(2):
		L[i][j] = int(L[i][j])
for i in range(number):
	print(L[i][0], 2 * L[i][0])


n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	print(a, 2 * a)


def main():
	count = int(input())
	for x in range(count):
		arr = input().split()
		print(int(arr[0]), 2 * int(arr[0]))
main()


n = int(input())
t = [tuple(map(int, input().split())) for _ in range(n)]
for i in t:
	print(i[0], i[0] * 2)


T = int(input(''))
low = []
high = []
for i in range(T):
	LH = input('').split()
	low.append(int(LH[0]))
	high.append(int(LH[1]))
for e in range(T):
	l = low[e]
	h = high[e]
	if h % l == 0:
		print(l, ' ', h)
	else:
		hi = h - h % l
		print(l, ' ', hi)


for _ in range(int(input())):
	(l, r) = list(map(int, input().split()))
	print(l, 2 * l)


n = int(input())
for i in range(n):
	(l, r) = list(map(int, input().split()))
	print(l, end=' ', flush=True)
	print(l + l)


T = input()
for i in range(0, int(T)):
	ran = input()
	ran = ran.split()
	l = int(ran[0])
	r = int(ran[1])
	x = 2 * l
	if x <= r:
		print(ran[0] + ' ' + str(x) + '\n')


t = int(input())
while t:
	(l, r) = list(map(int, input().split()))
	j = 2 * l
	i = l
	while j <= r:
		if j % i == 0:
			print(str(i) + ' ' + str(j))
			i = r + 1
			break
		else:
			j += l
	t -= 1


for sabki_maa_ki in range(int(input())):
	(l, r) = input().split()
	print(l, 2 * int(l))


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x == 1:
		print(x, y)
	else:
		print(x, 2 * x)


for q in range(int(input())):
	(l, r) = [int(i) for i in input().split()]
	print(l, l * 2)


k = int(input())
I = []
for i in range(k):
	s = list(map(int, input().split()))
	I.append(s)

def req_pair(a, b):
	if b >= 2 * a:
		return [a, 2 * a]
	for i in range(a, b + 1):
		for j in range(i + 1, b + 1):
			if j % i == 0:
				return [i, j]
for i in range(k):
	print(' '.join((str(j) for j in req_pair(I[i][0], I[i][1]))))


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(n, k) = map(int, input().split(' '))
	print(n, n * 2)


for _ in range(int(input())):
	(x, y) = map(int, input().strip().split())
	print(x, 2 * x)


def program():
	(a, b) = map(int, input().split())
	print(a, 2 * a)
for i in range(int(input())):
	program()


t = int(input())
for i in range(t):
	(R, L) = map(int, input().split())
	c = L // R
	print(R, c * R)


q = int(input())
for i in range(q):
	(w, e) = map(int, input().split())
	print(w, w * 2)


for i in range(int(input())):
	(l, r) = map(int, input().split())
	if l == 1:
		print(l, r)
	else:
		print(l, l * 2)


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if l == 1:
		x = l
		y = r
	else:
		x = l
		y = r - r % l
	print(x, y, sep=' ', end='\n')


T = int(input())
L = [0] * T
for i in range(T):
	entrada = str(input())
	L[i] = entrada.split()
for x in L:
	print(int(x[0]), 2 * int(x[0]))


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	(l, r) = map(int, sys.stdin.readline().split(' '))
	v = 2 * l
	print(l, v)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(T,) = getIntList()
for _ in range(T):
	(a, b) = getIntList()
	print(a, a * 2)


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	print(str(x) + ' ' + str(2 * x))


import os
import sys
import math
import collections
import cmath

def mp():
	return map(int, input().split())

def inp():
	return input()
n = int(inp())
for i in range(n):
	(a, b) = mp()
	print(str(a) + ' ' + str(a + a))


for i in range(int(input())):
	(n, k) = map(int, input().split())
	print(n, n * 2)


import sys
from io import StringIO as stream
from atexit import register
inf = float('inf')
mod = 1000000007

def sync_with_stdio():
	global input
	sys.stdin = stream(sys.stdin.read())

	def input():
		return sys.stdin.readline()
	sys.stdout = stream()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	for tc in range(int(input())):
		(l, r) = get_ints()
		print(l, 2 * l)
main()


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	temp = 0
	while temp != 1:
		if a * 2 <= b:
			temp = 1
			print(a, a * 2)
			a += 1
			break
		else:
			temp = 0
			a += 1


def find_dividor(l, r):
	print(l, l * 2)
num = int(input())
touples = []
for i in range(0, num):
	l_r = [int(x) for x in input().split()]
	touples.append(l_r)
for i in touples:
	find_dividor(i[0], i[1])


t = int(input())
(l, r) = ([], [])
for i in range(t):
	(l1, r1) = map(int, input().split())
	l.append(l1)
	r.append(r1)
for i in range(t):
	x = l[i]
	y = 2 * l[i]
	print(str(x) + ' ' + str(y))


t = int(input())
for case in range(t):
	(l, r) = [int(s) for s in input().split(' ')]
	print(l, 2 * l)


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	print('%d %d' % (l, 2 * l))


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	print(l[0], l[0] * 2)


t = int(input())
while t:
	(l, r) = map(int, input().split())
	print(l, 2 * l)
	t -= 1


a = int(input())
lis = []
for i in range(a):
	(b, c) = map(int, input().split())
	lis.append([b, c])
for i in range(a):
	b = lis[i][0]
	c = lis[i][1]
	che = 0
	newlis = range(b, c + 1)
	if b == 1:
		print(b, c)
		continue
	for i in range(len(newlis)):
		if newlis[i] * 2 in newlis:
			print(newlis[i], newlis[i] * 2)
			break


T = int(input())
for i in range(T):
	(l, r) = map(int, input().split())
	print(f'{l} {2 * l}')


import sys
from math import sqrt, floor, factorial
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	for _ in range(int(inp())):
		(n, m) = read()
		print(n, m - m % n)
solve()


m = int(input())
for i in range(m):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2, sep=' ')


n = int(input())
while n > 0:
	qry = [int(i) for i in input().split(' ')]
	print(qry[0], qry[0] * 2)
	n -= 1


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		print('%d %d' % (l, 2 * l))
main()


a = int(input())
for i in range(a):
	(b, c) = [int(i) for i in input().split()]
	print(b, b * 2, sep=' ')


T = int(input())
while T > 0:
	(l, r) = map(int, input().split())
	if l == 1:
		print(l, r)
	elif r == l:
		print(l, l)
	else:
		print(l, 2 * l)
	T -= 1


def int_lst_input():
	return [int(val) for val in input().split(' ')]

def int_input():
	return int(input())

def print_lst(lst):
	print(' '.join([str(val) for val in lst]))

def solve():
	t = int_input()
	for _ in range(t):
		(l, r) = int_lst_input()
		if l * 2 <= r:
			print(f'{l} {l * 2}')
solve()


t = int(input())
for _ in range(t):
	(a, b) = [int(x) for x in input().split()]
	print(a, 2 * a)


t = int(input())
lim = {}
for i in range(t):
	lim[i] = [None, None]
	(lim[i][0], lim[i][1]) = map(int, input().split())
for i in range(t):
	if lim[i][0] * 2 <= lim[i][1]:
		print(lim[i][0], lim[i][0] * 2)


test = int(input().strip())
for i in range(test):
	(l, r) = list(map(int, input().strip().split(' ')))
	x = l
	y = l * 2
	print(x, y)


n = int(input())
for x in range(n):
	(p, k) = list(map(int, input().split()))
	print(p, 2 * p)


n = int(input())
for _ in range(n):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if l * 2 <= r:
		print(str(l), str(2 * l))


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l == 1 or r % l == 0:
		print(l, r)
	else:
		print(l, r - r % l)


n = int(input())
i = 0
while n > i:
	(l, r) = map(int, input().split())
	i = i + 1
	print(l, l * 2)


class Solution(object):

	def solve(self):
		n = int(input())
		for i in range(n):
			(l, r) = map(int, input().strip().split(' '))
			flag = False
			for x in range(l, (r + 1) // 2 + 1):
				mul = 1
				_aux = x * mul
				while True:
					if _aux <= r and _aux != x:
						flag = True
						print(x, _aux)
						break
					mul += 1
					_aux = x * mul
				if flag:
					break
		return 0
sol = Solution()
sol.solve()


t = int(input())
while t:
	t -= 1
	l = list(map(int, input().split()))
	print(l[0], 2 * l[0])


for _ in range(int(input())):
	(l, r) = [int(i) for i in input().split()]
	if r % l == 0:
		print(l, r)
	else:
		print(l, l * 2)


x = input('')
x = int(x)
while x:
	(a, b) = input('').split()
	a = int(a)
	print(a, a * 2)
	x = x - 1


t = int(input())
i = 0
while i < t:
	(a, b) = map(int, input().split())
	print(a, a + a)
	i += 1


n = int(input())
for i in range(n):
	l = [int(x) for x in input().split()]
	print(l[0], l[0] * 2)


T = int(input())
for i in range(T):
	(x, y) = map(int, input().split())
	print(x, end=' ')
	print(2 * x)


t = int(input())
while t > 0:
	(l, r) = [int(i) for i in input().split()]
	print(l, end=' ')
	print(2 * l)
	t = t - 1


T = int(input())
for _ in range(T):
	(l, r) = map(int, input().strip().split())
	print('%d %d' % (l, l * 2))


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	step = int(r / l) + 1

	def f1():
		for i in range(l, r + 1):
			for j in range(2, step):
				if i * j <= r:
					return str(i) + ' ' + str(i * j)
				else:
					break
	print(f1())


queries = int(input())
for _ in range(queries):
	interval = tuple(map(int, input().split()))
	print(interval[0], interval[1] // interval[0] * interval[0])


t = int(input())
s = []
for i in range(t):
	(x, y) = input().split(' ')
	x = int(x)
	y = int(y)
	s.append(x)
	s.append(y)
for i in range(0, len(s), 2):
	print(s[i], s[i] * 2)


t = int(input())
for x in range(t):
	(l, r) = [int(i) for i in input().split()]
	print(l, l * 2)


from sys import stdin

def main():
	T = int(input())
	LR = [tuple(map(int, input().split())) for _ in [0] * T]
	for (l, r) in LR:
		print(l, l * 2)
input = lambda : stdin.readline()
main()


q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
for _ in [0] * qi():
	(x, y) = q()
	print(x, 2 * x)


t = int(input())
while t != 0:
	(l, r) = map(int, input().split())
	x = l
	y = x + x
	if y <= r:
		print(x, y)
	t = t - 1


t = int(input())
o = []
for _ in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	o.append(str(x) + ' ' + str(y))
for l in o:
	print(l)


for x in range(int(input())):
	(l, r) = map(int, input().split())
	print(l, l * 2)


for t in range(int(input())):
	(l, r) = map(int, input().split())
	for i in range(l, r + 1):
		x = r // i
		y = r % i
		if x > 1:
			print(i, r - y)
			break


T = int(input())
lp = []
for i in range(T):
	l = input().split(' ')
	l[0] = int(l[0])
	l[1] = int(l[1])
	lp.append(l)
for i in range(T):
	k = lp[i][0]
	k2 = k * 2
	print(k, end=' ')
	print(k2)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	(x, y) = (l, 2 * l)
	print(x, y)


t = int(input())
for i in range(t):
	(n, m) = map(int, input().split())
	print(n, n * 2)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(a, a + a)


for tin in range(int(input())):
	(a, b) = map(int, input().split())
	print(a, a * 2)


t = int(input())
for ii in range(t):
	(l, r) = map(int, input().split())
	if r % 2 == 0:
		print(r // 2, r)
	else:
		print(r // 2, r - 1)


r = input
exec(int(r()) * 'a=int(r().split()[0]);print(a,a*2);')


n = int(input())
for _ in range(n):
	l = list(map(int, input().split()))
	print(l[0], l[0] * 2)


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	(l, r) = invr()
	print(str(l) + ' ' + str(2 * l))


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
for _ in range(int(inp())):
	(l, r) = mp()
	print(l, 2 * l)


T = int(input())
lista = []
for i in range(T):
	lista.append(input().split())
for i in range(T):
	print(lista[i][0] + ' ' + str(2 * int(lista[i][0])))


def read(type=1):
	if type:
		file = open('input.dat', 'r')
		n = int(file.readline())
		line = list(map(int, file.readline().split()))
		file.close()
	else:
		n = int(input().strip())
		for i in range(n):
			line = list(map(int, input().strip().split()))
			solve(line[0], line[1])
	return (n, line)

def solve(x, y):
	print(x, 2 * x)
read(0)


for i in range(int(input())):
	(x, y) = map(int, input().split())
	print(x, y - y % x)


for sdghlga in range(int(input())):
	(l, r) = map(int, input().split())
	if r // l == r / l:
		print(l, r)
	else:
		print(l, 2 * l)


t = 0
range_arr = []

def read_input():
	global t, range_arr
	t = int(input())
	range_arr = [[0, 0] for i in range(t)]
	for i in range(t):
		(range_arr[i][0], range_arr[i][1]) = map(int, input().split())

def solve():
	pairs = []
	for r in range_arr:
		pair = []
		for i in range(r[0], r[1] + 1):
			if i == 1:
				pair = [1, r[1]]
				pairs.append(pair)
				break
			if i * 2 in range(i * 2, r[1] + 1):
				pair = [i, i * 2]
				pairs.append(pair)
				break
	return pairs
read_input()
pairs = solve()
for pair in pairs:
	print(pair[0], pair[1])


def find(a, b):
	if b % a == 0:
		print(a, b)
		return
	limit = b // a
	for i in range(2, limit + 1):
		if i * a <= b:
			print(a, i * a)
			return

def main():
	t = int(input())
	while t > 0:
		ipt = input().split()
		find(int(ipt[0]), int(ipt[1]))
		t -= 1
main()


for j in range(int(input())):
	(s, o) = list(map(int, input().split()))
	for i in range(s, o + 1):
		q = o // i
		if q > 1:
			break
	print(i, 2 * i)


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	rs = min(l, r)
	print(rs, 2 * rs)


import math
queries = input()
queries = int(queries)
for r in range(queries):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	print(l, 2 * l)


query = int(input())
for q in range(query):
	(a, b) = map(int, input().split())
	print(a, a * 2)


t = int(input())
for j in range(t):
	(l, r) = [int(i) for i in input().split()]
	i = 2
	tp = i * l
	while True:
		if tp <= r:
			print(l, tp)
			break
		else:
			tp = i * (l + 1)


def Find_Divisible(T):
	out_list = []
	for i in range(T):
		a = list(map(int, input().split(' ')))
		z = a[0] * 2
		if z <= a[1]:
			out_list += [(a[0], z)]
	for _ in out_list:
		print(_[0], _[1])
	return
T = int(input())
Find_Divisible(T)


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
import math
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def si():
	return input()

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
t = 1
t = int(input())
for _ in range(t):
	(l, r) = li()
	print(l, 2 * l)


T = int(input())
for i in range(T):
	(l, r) = [int(x) for x in input().split()]
	tmp = r // 2
	print('{} {}'.format(tmp, tmp * 2))


for i in range(0, int(input())):
	(x, y) = map(int, input().split())
	print(x, 2 * x)


t = int(input())
from heapq import heappop, heappush
for test in range(t):
	(n, m) = map(int, input().split())
	print(n, 2 * n)


for i in range(int(input())):
	(l, r) = map(int, input().split())
	r -= r % l
	print(l, r, sep=' ')


t = int(input())
while t > 0:
	t = t - 1
	(l, r) = map(int, input().split())
	if r % 2 == 0:
		print(r // 2, r)
	else:
		r = r - 1
		print(r // 2, r)


for _ in [0] * int(input()):
	l = int(input().split()[0])
	print(l, 2 * l)


inn = []
for x in range(int(input())):
	inn.append([int(x) for x in input().split()])
for l in inn:
	if 2 * l[0] <= l[1]:
		print(str(l[0]) + ' ' + str(2 * l[0]))
		continue


import time
t = int(input())
ans = []
start = time.time()
for i in range(t):
	(l, r) = (int(i) for i in input().split())
	ans.append([l, 2 * l])
for i in range(t):
	print(ans[i][0], ans[i][1])
finish = time.time()


import sys
n_queries = int(sys.stdin.readline().strip())
inputs = []
for q_id in range(n_queries):
	(l, r) = sys.stdin.readline().strip().split(' ')
	inputs.append((int(l), int(r)))
for (x, y) in inputs:
	print('{} {}'.format(x, x * 2))


n = int(input())
results = []
for i in range(n):
	(l, r) = tuple(map(int, input().split()))
	results.append(f'{l} {2 * l}')
print(*results, sep='\n')


T = int(input())
t = T
l = []
r = []
while T > 0:
	(x, y) = map(int, input().split())
	l.append(x)
	r.append(y)
	T -= 1
i = 0
while t > 0:
	if r[i] % l[i] == 0:
		print(l[i], ' ', r[i])
	else:
		r[i] -= r[i] % l[i]
		print(l[i], ' ', r[i])
	i += 1
	t -= 1


def GCF(x, y):
	while y != 0:
		t = y
		y = x % y
		x = t
	return int(x)
n = int(input())
output = []
for i in range(n):
	bounds = input().split()
	(l, r) = [int(x) for x in bounds]
	x = l
	f = 1
	while x <= r / 2:
		f += 1
		y = x * f
		if y <= r:
			break
	else:
		raise AssertionError('Cannot find divisible pair')
	output.append([x, y])
for line in output:
	print(*line)


t = int(input())
res = []
for i in range(0, t):
	(l, r) = map(int, input().split())
	x = l
	y = r - r % x
	res.append(f'{x} {y}')
for i in res:
	print(i)


T = int(input())
for t in range(T):
	(x, y) = map(int, input().strip().split())
	print(x, 2 * x)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	print(f'{l} {2 * l}')


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	_pp = range(l, r + 1)
	for i in _pp:
		if i * 2 in _pp:
			print(i, i * 2)
			break


t = int(input())
for g in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	print(str(x) + ' ' + str(y) + '\n')


def divisible(l, r):
	for x in range(l, r + 1):
		y = 2 * x
		if y <= r:
			return [x, y]
			break
T = int(input())
iterable = ' '
for i in range(T):
	inputlist = input().split()
	xy = divisible(int(inputlist[0]), int(inputlist[1]))
	print(str(xy[0]) + ' ' + str(xy[1]))


n = int(input())
for i in range(n):
	ch = input()
	l = ch.split()
	print(l[0] + ' ' + str(2 * int(l[0])))


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	print(a, 2 * a)


gi = lambda : list(map(int, input().split()))
(n,) = gi()
print('\n'.join([str(l[0]) + ' ' + str(l[0] * 2) for l in [gi() for e in range(n)]]))


def A():
	n = int(input())
	for i in range(n):
		lr = input().split()
		(l, r) = (int(lr[0]), int(lr[1]))
		print(' '.join([str(l), str(2 * l)]))
A()


t = int(input())
while t > 0:
	(l, r) = [int(i) for i in input().split()]
	x = l
	while True:
		if x * 2 <= r:
			print(x, end=' ')
			print(2 * x)
			break
		else:
			x += 1
	t -= 1


t = int(input())
x = 0
for i in range(t):
	k = list(map(int, input().split()))
	(l, m) = (k[0], k[1])
	for j in range(l, m + 1):
		if j * 2 <= m:
			print(j, j * 2)
			break


k = 0
x = int(input())
for i in range(x):
	(a, b) = map(int, input().split())
	if int(b / a) >= 1:
		print(a, b - b % a)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	p = min(a, b)
	print(p, p * 2)


a = int(input())
for i in range(a):
	(z, x) = map(int, input().split())
	print(z, z * 2)


n = int(input())
for _ in range(n):
	(i, _) = map(int, input().split())
	print(i, i * 2)


q = int(input())
c = 0
while c < q:
	y = input()
	w = y.split()
	l = int(w[0])
	r = int(w[1])
	ll = 2 * l
	print(l, ' ', ll)
	c += 1


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	(a, b) = mi()
	print(a, 2 * a)


import random
x = int(input())
if not 1 <= x <= 1000:
	raise Exception(' this number should be between 1 and 1000')
out = []
while x > 0:
	s = input()
	list1 = s.split()
	list1[0] = int(list1[0])
	list1[1] = int(list1[1])
	l = []
	if list1[0] < 1 or list1[1] < 1:
		raise Exception('the 2 numbers should be greater or equal 1 ')
	if list1[0] > list1[1] / 2:
		x -= 1
	elif list1[1] % list1[0] == 0:
		out.append((list1[0], list1[1]))
		x -= 1
	elif list1[1] < list1[1] * 2:
		out.append((list1[0], list1[0] * 2))
		x -= 1
	else:
		for i in range(list1[0], list1[1] + 1):
			for j in range(list1[0], list1[1] + 1):
				if i != j and j % i == 0:
					t = (i, j)
					l.append(t)
					break
		x -= 1
		if len(l) != 0:
			out.append(l[0])
for i in out:
	for j in i:
		print(j, end=' ')
	print()


n = int(input())
t = []
for i in range(n):
	t.append([])
for i in range(n):
	s = input().split(' ')
	t[i].append(int(s[0]))
	t[i].append(int(s[1]))
for i in range(n):
	print(t[i][0], t[i][1] - t[i][1] % t[i][0])


q = int(input())
for i in range(q):
	(l, r) = map(int, input().split())
	for j in range(l, r + 1):
		if j * 2 <= r + 1:
			print(j, j * 2)
			break


n = int(input())
for i in range(n):
	array = list(map(int, input().rstrip().split()))
	print(str(array[0]) + ' ' + str(2 * array[0]))


t = int(input())
(j, k) = (2, 0)
for i in range(t):
	c = []
	c = list(map(int, input().split()))
	while j >= 2:
		if (c[0] + k) * j <= c[1]:
			print(c[0] + k, (c[0] + k) * j)
			break
		j += 1
		k += 1


a = int(input())
b = 0
for i in range(a):
	(l, r) = map(int, input().split())
	print(l, l * 2)


t = int(input())
for i in range(t):
	(n, m) = map(int, input().split())
	if m % 2 == 0:
		print(m // 2, m)
	else:
		print(m // 2, m - 1)


s = int(input())
for i in range(s):
	li = list(map(int, input().split()))
	print(li[0], li[0] * 2)


n = int(input())
for _ in range(n):
	(left, right) = list(map(int, input().split()))
	for i in range(left, right):
		if 2 * i <= right:
			print(i, 2 * i)
			break


T = int(input())
for _ in range(T):
	(l, r) = [int(x) for x in input().split()]
	print(l, 2 * l)


from sys import stdin
t = int(stdin.readline().strip())
for _ in range(t):
	(l, r) = list(map(int, stdin.readline().split()))
	print(l, 2 * l)


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(l, r) = list(map(int, input().split()))
	print(l, 2 * l)


n = int(input())
for i in range(n):
	(n, s) = map(int, input().split())
	print(n, 2 * n)


import sys
a = input()
for x in range(0, int(a)):
	b = input().split()
	l = int(b[0])
	r = int(b[1])
	x = 2
	while True:
		if l * x <= r:
			print(l, l * x)
			break
		x += 1


n = int(input())
q = list(range(600000))
w = 0
q1 = 0
for i in range(0, n):
	temp = map(int, input().split(' '))
	(l, r) = temp
	q2 = 0
	for j in range(l, r + 1):
		for t in range(j * 2, r + 1):
			if t % j == 0:
				q[w] = j
				q[w + 1] = t
				w = w + 2
				q2 = q2 + t
				break
		if q2 == t:
			break
for i in range(0, n):
	print(q[q1], q[q1 + 1])
	q1 = q1 + 2


import math
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	print(l, 2 * l)


import math
n = int(input())
for i in range(1, n + 1):
	array = list(map(int, input().split()))
	print(array[0], 2 * array[0])


for i in range(int(input())):
	(a, b) = map(int, input().split())
	print(a, b - b % a)


t = int(input())
Answers = list()
for i in range(t):
	(l, r) = map(int, input().split())
	Answers.append(str(l) + ' ' + str(l + l))
print(*Answers, sep='\n')


n = int(input())
a = []
b = []
for i in range(0, n):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(x * 2)
for i in range(0, n):
	print(a[i], b[i])


for i in range(int(input())):
	a = list(map(int, input().split()))
	print(a[0], 2 * a[0])


from sys import stdin, stdout
t = int(stdin.readline())
for i in range(t):
	(l, r) = [int(x) for x in stdin.readline().strip().split()]
	stdout.write(f'{l} {l * 2}')
	if i != t - 1:
		stdout.write('\n')


T = int(input())
for Ind in range(T):
	(l, r) = map(int, input().split())
	if l == 1:
		print(l, r)
	else:
		print(l, 2 * l)


n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	if a[1] % a[0] == 0:
		print(a[0], a[1], sep=' ')
	else:
		print(a[0], 2 * a[0], sep=' ')


def read_nums():
	return [int(x) for x in input().split()]

def print_res(l, r):
	for x in range(l, r):
		for y in range(x, r + 1, x):
			if x == y:
				continue
			if y % x == 0:
				print(x, y)
				return

def main():
	(t,) = read_nums()
	for _ in range(t):
		(l, r) = read_nums()
		print_res(l, r)
main()


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	x = l
	d = r // l
	print(x, l * d)


from __future__ import division, print_function
import cmath
import itertools
import math
import operator as op
import sys
from atexit import register
from bisect import bisect_left, bisect_right
if sys.version_info[0] < 3:
	from io import BytesIO as stream
else:
	from io import StringIO as stream
	from math import gcd
if sys.version_info[0] < 3:

	class dict(dict):

		def items(self):
			return dict.iteritems(self)

		def keys(self):
			return dict.iterkeys(self)

		def values(self):
			return dict.itervalues(self)

	def gcd(x, y):
		while y:
			(x, y) = (y, x % y)
		return x
	input = raw_input
	range = xrange
	filter = itertools.ifilter
	map = itertools.imap
	zip = itertools.izip

def sync_with_stdio(sync=True):
	global input, flush
	if sync:
		flush = sys.stdout.flush
	else:
		sys.stdin = stream(sys.stdin.read())
		input = lambda : sys.stdin.readline().rstrip('\r\n')
		sys.stdout = stream()
		register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))

def main():
	t = int(input())
	for _ in range(t):
		(l, r) = map(int, input().split(' '))
		print(l, 2 * l)
sync_with_stdio(False)
main()


p_nos = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]

def findDivisible(l, r):
	for i in range(l, r + 1):
		for p in p_nos:
			if i * p <= r:
				return (i, i * p)
	return (-1, -1)
for _ in range(int(input())):
	s = input().split()
	l = int(s[0])
	r = int(s[1])
	(n1, n2) = findDivisible(l, r)
	print('{} {}'.format(n1, n2))


n = int(input())
mass = []
for i in range(n):
	mass.append([int(j) for j in input().split()])
for i in range(n):
	print(mass[i][0], mass[i][0] * 2)


import sys
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def read():
	tc = 0
	if tc:
		input = sys.stdin.readline
	else:
		sys.stdin = open('input1.txt', 'r')
		sys.stdout = open('output1.txt', 'w')

def solve():
	for _ in range(ii()):
		(l, r) = mi()
		print(l, 2 * l)
solve()


t = int(input())
for cas in range(t):
	(l, r) = map(int, input().split(' '))
	print(l, 2 * l)


t = int(input())
k = 0
while k < t:
	(l, r) = map(int, input().split())
	a = l * 2
	print(l, ' ', a)
	k += 1


n = int(input())
l = []
for i in range(n):
	a = list(map(int, input().split()))
	l.append(a)
for i in range(n):
	for j in range(0, l[i][1] + 1):
		p = l[i][0]
		x = p * j
		if x <= l[i][1] and x >= l[i][0] and (p != x):
			print(p, end=' ')
			print(x)
			break


n = int(input())
for i in range(0, n):
	(x, y) = [int(a) for a in input().split()]
	for j in range(x, y + 1):
		print(j, 2 * j)
		break


t = int(input())
for i in range(0, t):
	inp = list(map(int, input().split()))
	l = inp[0]
	r = inp[1]
	print(l, end=' ')
	k = r % l
	t = r - k
	print(t)


from math import sqrt
q = int(input())
while q:
	(x, y) = map(int, input().split())
	print(x, 2 * x)
	q -= 1


t = int(input())
for i in range(t):
	n = list(map(int, input().strip().split()))
	print(n[0], 2 * n[0])


def solve(l, r):
	return (l, 2 * l)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	(a, b) = solve(l, r)
	print(a, b)


T = int(input())
ans = []
for i in range(T):
	r = list(map(int, input().split()))
	ans.append([str(r[0]), str(2 * r[0])])
for i in ans:
	print(' '.join(i))


t = int(input())
for z in range(1, t + 1):
	(x, y) = map(int, input().split())
	print(x, 2 * x)


n = int(input())
q = []
for i in range(n):
	a = list(map(int, input().split(' ')))
	print(str(a[0]) + ' ' + str(a[0] * 2))


t = int(input())
a = []
for i in range(0, t):
	(l, r) = [int(j) for j in input().split()]
	a.append([l, r])
for i in a:
	if i[0] == 1:
		print(i[0], i[1])
	elif i[0] * 2 <= i[1]:
		print(i[0], i[0] * 2)


t = int(input())
while t > 0:
	(l, r) = input().split(' ')
	l = int(l)
	r = int(r)
	print(l, 2 * l)
	t -= 1


n = int(input())
for i in range(0, n):
	(l, m) = map(int, input().split())
	print(l, l * 2)


for i in range(int(input())):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	remainder = y % x
	print(x, y - remainder)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if b % a == 0:
		print(a, b)
	else:
		d = b % a
		print(a, b - d)


t = int(input())
while t > 0:
	(x, y) = map(int, input().split())
	print(x, x * 2)
	t -= 1


n = int(input())
for i in range(n):
	z = list(map(int, input().split()))
	if z[0] == 1:
		print(z[0], z[1])
	else:
		status = True
		j = 1
		while status:
			j += 1
			if z[0] * j <= z[1]:
				status = False
				print(z[0], z[0] * j)
				break
			else:
				z[0] += 1


a = int(input())
for q in range(a):
	(n, m) = map(int, input().split())
	print(n, n * 2, sep=' ')


t = int(input())
while t > 0:
	(l, r) = map(int, input().split(' '))
	print(l, end=' ')
	print(l + l)
	t -= 1


T = int(input())
for i in range(T):
	(l, r) = map(int, input().split())
	print('{0} {1}'.format(l, 2 * l))


a = input()
a = int(a)
content = []
for i in range(a):
	x = input()
	content.append(x)
for i in range(a):
	content[i] = content[i].split()
for i in content:
	print(i[0], int(i[0]) * 2)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
for _ in range(get_int()):
	(l, r) = get_list()
	if l == 1:
		x = l
		y = l + 1
	elif 2 * l <= 998244353:
		x = l
		y = 2 * l
	print(x, y)


n = int(input())
for i in range(0, n):
	(a, b) = map(int, input().split())
	print(a, a * 2)


t = int(input())
for _ in range(t):
	(z, x) = map(int, input().split())
	print(z, 2 * z)


n = int(input())
t = 0
while t < n:
	a = input().split()
	x = int(a[0])
	y = 2 * x
	print(str(x) + ' ' + str(y))
	t += 1


t = int(input())
for i in range(0, t):
	a = list(map(int, input().split()))
	for j in range(a[0], a[1] + 1):
		print(j, j * 2)
		break


try:
	n = int(input())
	for i in range(0, n):
		(a, b) = map(int, input().split())
		for i in range(a, b):
			if i + i <= b:
				print(i, i + i, sep=' ')
				break
except:
	print(n, a, b)


def ii():
	return int(input())

def mi():
	return list(map(int, input().split()))

def li():
	return list(mi())
for t in range(ii()):
	(l, r) = mi()
	print(l, 2 * l)


t = int(input())
for k in range(t):
	(a, b) = [int(e) for e in input().strip().split()]
	target = b
	start = a
	found = False
	while not found:
		if start * 2 <= target and start != start * 2:
			print('{} {}'.format(start, start * 2))
			found = True
			break
		elif start * 2 > target:
			tmp = start * 2 - target
			tmp = start - tmp
			if start != target - tmp:
				print('{} {}'.format(start, target - tmp))
				found = True
				break
		for i in range(start, target + 1):
			if target % start == 0:
				print('{} {}'.format(start, target))
				found = True
				break
		if not found:
			target -= 1


T = int(input())
for i in range(T):
	(l, r) = map(int, input().split(' '))
	j = l
	while j * 2 > r:
		j += 1
	print(j, j * 2)


def couple(left):
	return (str(left), str(left + left))

def main():
	for _ in range(int(input())):
		[left, _] = [int(_) for _ in input().split()]
		print(' '.join(couple(left)))
main()


t = int(input())
for i in range(t):
	(a, b) = [int(x) for x in input().split()]
	print(str(a), str(a * 2))


n = int(input())
v = []
for i in range(n):
	k = input().split()
	for c in k:
		v.append(int(c))
	print(v[0], v[0] * 2)
	v = []


T = int(input())
for i in range(T):
	(u, v) = map(int, input().split())
	print(u, 2 * u)


T = int(input())
x = []
y = []
for _ in range(T):
	(X, Y) = map(int, input().split())
	x.append(X)
	y.append(Y)
for i in range(T):
	X = x[i]
	Y = y[i]
	print(X, X * 2)


n = int(input())
while n != 0:
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	x = l
	y = r
	while x < y:
		if 2 * x <= y:
			print(x, 2 * x)
			break
		elif y / 2 >= x:
			print(y / 2, y)
			break
		else:
			x = x + 1
			y = y - 1
	n = n - 1


t = int(input())
check = 0
for i in range(t):
	(l, r) = map(int, input().split())
	print(l, l * 2)


amount = int(input())
for i in range(amount):
	(left, right) = [int(s) for s in input().split()]
	if left == 1:
		print(left, left + 1)
	else:
		print(left, left * 2)


for i in ' ' * int(input()):
	(a, b) = map(int, input().split())
	print(a, a * 2)


t = int(input().strip())
for i in range(t):
	(x, y) = list(map(int, input().strip().split()))
	assert y >= 2 * x
	print(x, 2 * x)


N = int(input())
for i in range(N):
	(l, j) = [int(i) for i in input().split()]
	s = str(l) + ' ' + str(2 * l)
	print(s)


a = int(input())
for i in range(a):
	(l, r) = list(map(int, input().split()))
	print(l, 2 * l)


n = int(input())
for i in range(0, n):
	(a, b) = map(int, input().split(' '))
	if a == 1:
		print(a, end=' ')
		print(b)
	elif b - a >= a:
		print(a, end=' ')
		print(a * 2)


nb_qry = int(input())
for _ in range(nb_qry):
	(l, r) = [int(x) for x in input().split()]
	begin = 2
	while True:
		if l * begin <= r:
			print(l, l * begin)
			break
		begin += 1


for i in range(int(input())):
	tmp = input().split()
	print(int(tmp[0]), int(tmp[0]) * 2)


t = int(input())
a = []
for i in range(t):
	(l, r) = map(int, input().split())
	for j in range(l, r + 1):
		if j * 2 <= r:
			a.append((j, j * 2))
			break
for item in a:
	print(item[0], item[1])


n = int(input())
while n:
	n -= 1
	ar = input().split()
	print(ar[0], int(ar[0]) * 2)


def gcd(a, b):
	while b != 0:
		a %= b
		if a == 0:
			return b
		b %= a
	return a
q = int(input())
for _ in range(q):
	(l, r) = map(int, input().split())
	for i in range(l, r + 1):
		if r % l == 0:
			print(l, r)
			break
		elif l * 2 <= r:
			print(l, l * 2)
			break
		elif r % 2 == 0:
			print(r // 2, r)
			break
		else:
			assert False


import math
import bisect
import itertools
import sys
I = lambda : sys.stdin.readline()
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 1:
		return False
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	print(min(x, y), 2 * min(x, y))


T = int(input())
l = [None] * T
r = [None] * T
for x in range(T):
	(l[x], r[x]) = map(int, input().split())
for y in range(T):
	print(l[y], l[y] * 2)


t = int(input())
for a0 in range(t):
	(l, r) = map(int, input().split())
	if l == 1:
		print(str(l) + ' ' + str(r))
	elif r >= 2 * l:
		print(str(l) + ' ' + str(2 * l))


n = int(input())
amin = 1
amax = 998244353
for i in range(n):
	(l, r) = list(map(int, input().split()))
	if l == 1:
		print(l, r)
	else:
		for i in range(r - l):
			if r % l == 0:
				print(l, r)
				break
			else:
				r = r - r % l


t = int(input())
sum = 0
count = 0
for i in range(1, t + 1, 1):
	(x, y) = map(int, input().split())
	sum = 2 * x
	if x != sum:
		print(x, sum)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(t,) = I()
while t:
	t -= 1
	(n, k) = I()
	print(n, 2 * n)


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	v = 2
	while True:
		ans = l * v
		if ans <= r and l is not ans:
			print(l, ans)
			break
		elif ans > r:
			l += 1
			v = l
			continue
		v += 1


t = int(input())
for _ in range(t):
	l1 = list(map(int, input().split()))
	l = l1[0]
	r = l1[1]
	print(l, 2 * l)


for v in range(int(input())):
	(a, b) = map(int, input().split())
	print(a, 2 * a)


x = int(input())
for i in range(x):
	(l, r) = map(int, input().split())
	semi = r % l
	r -= semi
	print(l, r)


t = int(input())
for q in range(t):
	(x, y) = map(int, input().split(' '))
	while 1:
		if 2 * x <= y:
			print(x, 2 * x)
			break
		else:
			x = x + 1


def check(a, b):
	print(a, a * 2)
t = int(input())
while t > 0:
	(a, b) = map(int, input().split())
	check(a, b)
	t -= 1


T = int(input())
for i in range(T):
	(l, r) = list(map(int, input().split()))
	if r % l == 0:
		y = r
		x = l
		print(x, y)
	elif l * 2 <= r:
		print(l, 2 * l)


import sys
t = int(sys.stdin.readline().strip())
for i in range(t):
	(l, r) = [int(elem) for elem in sys.stdin.readline().strip().split()]
	print(l, 2 * l)


for _ in ' ' * int(input()):
	a = int(input().split()[0])
	print(a, a * 2)


T = int(input())
for cas in range(T):
	(l, r) = map(int, input().split())
	print(l, l << 1)


x = eval(input())
z = 0
i = 0
while z < x:
	l = list(map(int, input().split()))
	print(l[0], 2 * l[0])
	z += 1


t = int(input())
for i in range(t):
	(l, r) = [int(x) for x in input().split()]
	for j in range(l, r + 1):
		print(j, 2 * j)
		break


n = int(input())
qt = [[int(i) for i in input().split()] for u in range(n)]
for (x, y) in qt:
	print('{} {}'.format(x, 2 * x))


t = int(input())
for i in range(t):
	m = list(map(int, input().split()))
	p = m[0]
	q = m[1]
	print(p, p * 2)


for _ in range(int(input())):
	(l, r) = [int(i) for i in input().split()]
	print(l, 2 * l)


tc = int(input())
while tc != 0:
	tc -= 1
	(a, b) = map(int, input().split())
	print(a, a * 2)


def kratnye(lst):
	a = list()
	for elem in lst:
		a.append([elem[0], 2 * elem[0]])
	return a
N = int(input())
b = list()
for i in range(N):
	(l, r) = [int(j) for j in input().split()]
	b.append([l, r])
c = kratnye(b)
for elem in c:
	print(*elem)


X = int(input())
while X:
	(l, r) = map(int, input().split())
	print(l, 2 * l)
	X -= 1


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if l == 1:
		print(1, 2)
	else:
		k = False
		for x in range(l, r):
			y = x * 2
			while y <= r:
				if y % x == 0:
					print(x, y)
					k = True
					break
				else:
					break
			if k == True:
				break


for i in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	print(x, x * 2)


for x in range(int(input())):
	(a, b) = map(int, input().split())
	print(a, 2 * a)


t = int(input())
anss = []
for h in range(t):
	(l, r) = map(int, input().split())
	k = 1
	for i in range(l * 2, r + 1):
		for j in range(l, i // 2 + 1):
			if i % j == 0:
				ans = [j, i]
				k = 0
				break
		if k == 0:
			break
	anss += [ans]
for i in range(t):
	print(*anss[i])


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		(a, b) = LI()
		ans.append([a, a * 2])
	for x in ans:
		print(' '.join([str(a) for a in x]))
main()


t = int(input())
c = False
for i in range(t):
	(l, r) = map(int, input().split())
	if l * 2 in range(l, r + 1):
		print(l, l * 2)


a = eval(input())
i = 0
x = []
while i < a:
	x += list(map(int, input().split()))
	i += 1
ans = []
i = 0
b = 0
while i < len(x) - 1:
	b = x[i + 1] % x[i]
	b = x[i + 1] - b
	ans += [x[i]] + [b]
	i += 2
i = 0
while i < len(ans):
	print(ans[i], ans[i + 1])
	i += 2


def FindDivision(start):
	return (start, start * 2)
n = int(input())
nlist = []
for i in range(n):
	line = input()
	item = line.split(' ')
	(start, end) = (int(item[0]), int(item[1]))
	nlist.append((start, end))
for (start, _) in nlist:
	(key, num) = (start, start * 2)
	print(key, num)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	(a, b) = (l[0], l[1])
	for i in range(a, b):
		j = i
		f = 0
		j += j
		while j <= b:
			if j % i == 0:
				f = 1
				print(i, j)
				break
			j += j
		if f == 1:
			break


def get_divisor(l, r):
	(x, y) = (l, r)
	if x * 2 <= r:
		return (x, x * 2)
	else:
		return (0, 0)
T = int(input())
inputs = [input() for i in range(T)]
for i in range(len(inputs)):
	(l, r) = map(int, inputs[i].split())
	(x, y) = get_divisor(l, r)
	print('{} {}'.format(x, y))


qu = int(input())
sols = []
for i in range(qu):
	lr = input().split()
	l = int(lr[0])
	r = int(lr[1])
	sols.append(str(l) + ' ' + str(2 * l))
for i in range(qu):
	print(sols[i])


t = int(input())
while t > 0:
	k = input().split()
	n = int(k[0])
	m = int(k[1])
	k = m % n
	if k == 0:
		print(n, end=' ')
		print(m)
	else:
		print(n, end=' ')
		print(m - k)
	t -= 1


a = int(input())
for i in range(a):
	(c, d) = map(int, input().split())
	print(c, 2 * c, sep=' ')


t = int(input())
s = []
for inggfk in range(0, t):
	x = input()
	xx = x.split()
	l = int(xx[0])
	y = int(xx[1])
	p = [l, 2 * l]
	s.append(p)
for i in s:
	print(i[0], end=' ')
	print(i[1])


testcase = int(input())
for i in range(testcase):
	(x, y) = [int(t) for t in input().split()]
	print(x, y - y % x)


t = int(input())
while t > 0:
	t -= 1
	(l, r) = (int(i) for i in input().strip().split())
	if 2 * l <= r:
		print(f'{l} {2 * l}')
		continue


T = int(input())
for j in range(T):
	s = input()
	s = s.split(' ')
	try:
		for i in range(int(s[0]), int(s[1]) + 1):
			u = 2
			l = []
			while i * u <= int(s[1]):
				if len(l) != 0:
					break
				t = i * u
				l.append(t)
				u = u + 1
			if len(l) != 0:
				print(i, int(l[0]))
				raise ValueError
	except ValueError:
		continue


def calc(l, r):
	if 2 * l <= r:
		return (l, 2 * l)
	return (1, 2)
T = int(input())
for i in range(T):
	[l, r] = list(map(int, input().split()))
	res = calc(l, r)
	print(' '.join(map(str, res)))


n = int(input())
for i in range(n):
	(a, b) = list(map(int, input().split()))
	x = a
	y = a + a
	print(x, y)


t = int(input())
while t:
	t -= 1
	(l, r) = [int(x) for x in input().split()]
	print(l, 2 * l)


n_queries = int(input())
res = []
for k in range(n_queries):
	(l, r) = list(map(int, input().split()))
	if l == 1:
		res.append((1, r))
	else:
		flag = True
		while flag:
			if 2 * l <= r:
				res.append((l, 2 * l))
				flag = False
			else:
				l += 1
for r in res:
	print('{} {}'.format(r[0], r[1]))


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	a = (r - l) // l
	if a == 1:
		a = 2
	print(l, l * a)


import collections
import itertools
import math
try:
	n = int(input())
	for i in range(0, n):
		(x, y) = map(int, input().split())
		for i in range(x, y + 1):
			if i * 2 <= y:
				v = i
				u = 2 * i
				break
		print(v, u)
except:
	pass


t = int(input())
for z in range(t):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)


x = int(input())
while x > 0:
	(l, r) = map(int, input().split())
	print(l, 2 * l)
	x -= 1


t = int(input())
while t > 0:
	(l, r) = tuple(map(int, input().split(' ')))
	print(str(l) + ' ' + str(2 * l))
	t -= 1


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if r % l == 0:
		print(l, r)
	else:
		a = r % l
		t = r - a
		print(l, t)


for _ in range(int(input())):
	(l, _) = map(int, input().split())
	print(l, 2 * l)


t = int(input())
for i in range(t):
	q = input()
	lst = q.split()
	x = int(lst[0])
	r = int(lst[1])
	y = 2 * x
	print(x, ' ', y)


lines = int(input())
z = 0
answer = []
while z < lines:
	numbers = input()
	number = numbers.split()
	number = list(map(int, number))
	x = number[0]
	y = number[1]
	y = int(y / x) * x
	a = 0
	b = 1
	answer.append(x)
	answer.append(y)
	a = a + 2
	b = b + 2
	z = z + 1
z = 0
while z < len(answer):
	print('' + str(answer[z]) + ' ' + str(answer[z + 1]))
	z = z + 2


n = int(input())
l = [[int(i) for i in input().split()] for i in range(n)]
for i in l:
	a = i[1] // i[0]
	b = a * i[0]
	print(i[0], b)


t = int(input())
while t:
	(a, b) = map(int, input().split())
	b = 2 * a
	print(a, end=' ')
	print(b)
	t -= 1


t = int(input())
lst = list()
for ii in range(t):
	(l, r) = list(map(int, input().strip().split()))
	for i in range(l, r + 1):
		for j in range(l + i, r + 1):
			if j % i == 0 and i != j:
				lst.extend([i, j])
				break
		break
for q in range(0, len(lst), 2):
	print(str(lst[q]) + ' ' + str(lst[q + 1]))


case = int(input())
for x in range(case):
	(y, z) = map(int, input().split())
	print('{first} {second}'.format(first=y, second=y + y))


kol = int(input())
answers = []
for i in range(0, kol):
	line = input().split(' ')
	a = int(line[0])
	b = int(line[1])
	answers.append([a, a + a])
for answer in answers:
	print(*answer)


t = int(input())
while t:
	x = input()
	x = x.split(' ')
	x[0] = int(x[0])
	x[1] = int(x[1])
	print(x[0], 2 * x[0])
	t = t - 1


t = int(input())
for case in range(t):
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		for i in range(l, r + 1):
			for j in range(i + 1, r + 1):
				if j % i == 0:
					print(i, j)


t = int(input())
for tt in range(t):
	(l, r) = map(int, input().split())
	a = l
	b = 2 * a
	print(a, b)


n = int(input())
for i in range(0, n):
	p = input().rstrip().split(' ')
	l = int(p[0])
	r = int(p[1])
	O = 0
	F = r // l
	G = F * l
	print(l, G)


n = int(input())
while n > 0:
	(x, y) = input().split()
	print(x, int(x) * 2)
	n -= 1


t = int(input())
for i in range(t):
	(l, r) = list(map(int, input().split()))
	print(str(l) + ' ' + str(2 * l))


n = int(input())
for i in range(n):
	(l, r) = map(int, input().split())
	if l == 1:
		print(1, '', r)
	else:
		ans = r - r % l
		print(l, ans)


n = int(input())
A = [[int(j) for j in input().split()] for i in range(n)]
for (a, b) in A:
	if b % 2 != 0:
		b -= 1
	print(b // 2, b)


numQueries = int(input())
for i in range(numQueries):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * x
	print(x, y)


import sys

def rint():
	return map(int, sys.stdin.readline().split())
n = int(input())
for i in range(n):
	(l, r) = rint()
	print(l, l * 2)


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	print(l, l + l)


import math
from collections import *
import sys
from functools import reduce

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
DIRECTIONS = [[0, 1], [0, -1], [1, 0], [1, -1]]
NEIGHBOURS = [(i, j) for i in range(-1, 2) for j in range(-1, 2) if i != 0 or j != 0]
OrdUnicode_a = ord('a')
OrdUnicode_A = ord('A')
CAPS_ALPHABETS = {chr(i + OrdUnicode_A): i for i in range(26)}
SMOL_ALPHABETS = {chr(i + OrdUnicode_a): i for i in range(26)}
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0) + 1
INFINITY = float('inf')
for _testcases_ in range(int(input())):
	(l, r) = get_ints()
	print(l, l * 2)


import math
n = int(input())
end = 0
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	end = 0
	for j in range(b, a - 1, -1):
		for k in range(1, int(math.sqrt(j)) + 1, +1):
			if j % k == 0:
				if k >= a and k != j:
					print(k, j)
					end = 1
					break
				elif int(j / k) >= a and j != j / k:
					print(int(j / k), j)
					end = 1
					break
		if end == 1:
			break


n = int(input())
for x in range(0, n):
	(a, b) = input().split()
	print(int(a), ' ', int(a) * 2)


t = int(input())
count = 0
ans = ''
while count < t:
	d = input()
	(l, r) = d.split()
	if int(l) == 1:
		ans += l + ' ' + r
	else:
		div = int(l) * 2
		ans += l + ' ' + str(div)
	ans += '\n'
	count += 1
print(ans)


n = int(input())
for i in range(n):
	(a, b) = tuple(map(int, input().split()))
	if a == 1:
		print(a, b)
	else:
		print(a, a * (b // a))


import math

def string_list(s, char):
	output_list = []
	intermediator = ''
	for i in range(len(s)):
		if s[i] != char:
			intermediator += s[i]
			if i == len(s) - 1:
				output_list.append(int(intermediator))
		elif intermediator:
			output_list.append(int(intermediator))
			intermediator = ''
	return output_list

def list_string(l, char):
	output_str = ''
	for i in range(len(l) - 1):
		output_str += str(l[i]) + char
	output_str += str(l[len(l) - 1])
	return output_str

def merge_sort(l):

	def merge(l1, l2):
		(i, j) = (0, 0)
		output_list = []
		while i < len(l1) and j < len(l2):
			if l1[i][0] < l2[j][0]:
				output_list.append(l1[i])
				i += 1
			else:
				output_list.append(l2[j])
				j += 1
		if i == len(l1):
			output_list += l2[j:]
		else:
			output_list += l1[i:]
		return output_list

	def sorts(l):
		if len(l) < 2:
			return l
		else:
			mid = len(l) // 2
			left = sorts(l[:mid])
			right = sorts(l[mid:])
			return merge(left, right)
	return sorts(l)

def main_function():
	output_list = []
	t = int(input())
	for i in range(t):
		(a, b) = string_list(input(), ' ')
		output_list.append(f'{a} {2 * a}')
	return list_string(output_list, '\n')
print(main_function())


for _ in range(int(input())):
	(l, r) = [int(x) for x in input().split()]
	for i in range(l, r + 1):
		if i * 2 <= r:
			print(i, i * 2)
			break


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	for j in range(l, r):
		if j * 2 <= r:
			print(str(j) + ' ' + str(j * 2))
			break


T = int(input())
for i in range(T):
	(l, r) = input().split(' ')
	print(str(int(l)) + ' ' + str(int(l) * 2))


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	(x, y) = (l, r)
	if not y % x:
		print(x, y)
	else:
		print(x, x * 2)


from math import *
from collections import *

def inp():
	return map(int, input().split())

def inp_arr():
	return list(map(int, input().split()))
t = int(input())
while t:
	arr = inp_arr()
	print(arr[0], arr[0] * 2)
	t -= 1


import math
n = int(input())

def func(l, r):
	print(l, 2 * l)
for i in range(n):
	(l, r) = list(map(int, input().split()))
	func(l, r)


x = int(input())
s = []

def f(x):
	a = x[1] // x[0]
	return a * x[0]
for n in range(x):
	s.append([int(n) for n in input().split()])
	print('{} {}'.format(s[n][0], f(s[n])))


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	T = int(stdin.readline())
	for _ in range(T):
		(l, r) = [int(x) for x in stdin.readline().split()]
		stdout.write(str(l) + ' ' + str(l * 2) + '\n')
	return 0
main()


t = int(input())
for _ in range(t):
	[l, r] = list(map(int, input().rstrip().split()))
	print(' '.join([str(l), str(2 * l)]))


for t in range(int(input())):
	(a, b) = map(int, input().split(' '))
	start = a
	end = b
	while start < end:
		j = 2
		m = start + (end - start) // 2
		if m * 2 <= b:
			print(m, m * 2)
			break
		else:
			end = m


def I():
	return map(int, input().split())

def a(l, r):
	for x in range(l, r):
		for y in range(x + 1, r + 1):
			if y % x == 0:
				print(x, y)
				return
for _ in range(int(input())):
	(l, r) = I()
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		a(l, r)


T = int(input())
for i in range(T):
	line = [int(x) for x in input().split()]
	(l, r) = (line[0], line[1])
	if l == 1:
		print(str(l) + ' ' + str(r))
	elif l * 2 <= r:
		print(str(l) + ' ' + str(l * 2))


def findDivisible(l, r):
	for x in range(l, r):
		if 2 * x <= r:
			print(x, 2 * x)
			break
t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	findDivisible(arr[0], arr[1])


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
for _ in range(ii()):
	(a, b) = mi()
	print(a, a * 2)


tests = int(input())
for i in range(tests):
	(l, r) = map(int, input().split())
	print(l, l * (r // l))


n = int(input())
i = 0
while i < n:
	x = input()
	x = x.split()
	x[0] = int(x[0])
	x[1] = int(x[1])
	print(x[0], 2 * x[0])
	i = i + 1


import sys
import math
data = sys.stdin.readlines()
for i in range(int(data[0])):
	a = list(map(int, data[i + 1].split(' ')))
	print(a[0], a[0] * 2)


t = int(input())
for i in range(t):
	s = input().split()
	l = int(s[0])
	print(l, l * 2)


t = int(input())
for e in range(t):
	(a, _) = input().split()
	print(a, 2 * int(a))


import sys
T = int(sys.stdin.readline().strip())
for t in range(0, T):
	line = sys.stdin.readline().strip().split()
	l = int(line[0])
	r = int(line[1])
	print(str(l) + ' ' + str(2 * l))


n = int(input())
for i in range(0, n):
	(l, r) = [int(x) for x in input().split()]
	print('{x} {y}'.format(x=l, y=2 * l))


t = int(input())
o = []
for _ in range(t):
	(l, r) = map(int, input().split())
	o.append('%i %i' % (l, 2 * l))
print('\n'.join(o))


n = int(input())
lst = list()
for i in range(n):
	lst.append(tuple(map(int, input().split())))
for (l, r) in lst:
	print(l, 2 * l)


t = int(input())
for I in range(t):
	(l, r) = map(int, input().split())
	ct = 0
	for i in range(l, r):
		if i * 2 in range(l, r + 1):
			print('{} {}'.format(i, i * 2))
			break


for t in range(int(input())):
	l = int(input().split()[0])
	print(l, 2 * l)


q = int(input())
for _ in range(q):
	(n, k) = map(int, input().split())
	print(n, n * 2)


amount = int(input())
for i in range(amount):
	x = [int(i) for i in input().split()]
	print(x[0], x[0] * 2)


class Solution:

	def solve(self):
		t = int(input())
		for i in range(t):
			s = input()
			(l, r) = map(int, s.split())
			print(l, l * 2)
s = Solution()
s.solve()


import math, sys
from fractions import *

def mp():
	return list(map(int, input().split()))

def main():
	t = int(input())
	for i in range(t):
		(l, r) = mp()
		print(l, l * 2)
deb = 0
if deb:
	file = open('input.txt', 'w')
else:
	input = sys.stdin.readline
main()


test_cases = int(input())
for each_test_case in range(test_cases):
	(l, r) = map(int, input().split())
	print(l, 2 * l)


T = int(input())
for i in range(T):
	user = input()
	(a, b) = user.split(' ')
	(a, b) = (int(a), int(b))
	print(a, a * 2)


for _ in [0] * int(input()):
	(l, r) = map(int, input().split())
	print(l, 2 * l)


T = int(input())
for i in range(T):
	L = [int(i) for i in input().split()]
	print(L[0], 2 * L[0])


n = int(input())
i = 0
while i < n:
	a = input().split(' ')
	l = int(a[0])
	r = int(a[1])
	t = l * 2
	if t <= r:
		print(l, t)
	i = i + 1


T = int(input())
for _ in range(T):
	(u, v) = map(int, input().split())
	print('{0} {1}'.format(u, u * 2))


t = int(input())
for w in range(t):
	(l, r) = (int(i) for i in input().split())
	print(l, l + l)


T = int(input())
for _ in range(T):
	(l, r) = map(int, input().split())
	print('{} {}'.format(l, 2 * l))


n = int(input())
print()
l = []
for i in range(n):
	s = input()
	s = s.split()
	l.append(s[0])
for i in l:
	print(int(i), int(i) * 2)


from sys import stdin, stdout

def main():
	for _ in range(int(stdin.readline())):
		(l, r) = map(int, stdin.readline().split())
		for i in range(l, r + 1):
			j = 2 * i
			if j != i and j <= r and (j >= l):
				stdout.write(str(i) + ' ' + str(j) + '\n')
				break
main()


def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
t = ii()
for i in range(t):
	(l, r) = mi()
	print(l, l * 2)


from sys import stdin
n = int(stdin.readline())
for _ in range(n):
	(x, y) = map(int, stdin.readline().rstrip().split(' '))
	print(x, x + x)


n = int(input())
t = []
for i in range(n):
	s = input()
	a = s.split()
	l = int(a[0])
	r = int(a[1])
	t.append([l, l * 2])
for j in range(n):
	print(t[j][0], t[j][1])


import sys
t = int(input())
for i in range(1, t + 1):
	(l, r) = map(int, input().split())
	print(l, l + l)
sys.exit()


t = int(input())
while t != 0:
	(l, r) = map(int, input().split())
	if l == 1:
		print(l, end=' ')
		print(r)
		t -= 1
	else:
		diff = r - l
		if diff >= l:
			print(l, end=' ')
			print(l + l)
		t -= 1


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	c = 0
	for i in range(l, r):
		if i * 2 <= r:
			print(i, i * 2)
			break


x = int(input())
while x > 0:
	(a, b) = map(int, input().split())
	print(a, ' ', 2 * a)
	x = x - 1


for _ in range(int(input())):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	x = l
	y = r
	while True:
		if x != y and x >= l and (y <= r) and (y % x == 0):
			break
		elif y % x > 0 and y % x < y and (y - y % x > x):
			y -= y % x
	print(str(x) + ' ' + str(y))


import sys

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def next(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = sys.stdin.readline().split()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_int(self):
		return int(self.next())

	def solve(self):
		n = self.next_int()
		for i in range(0, n):
			l = self.next_int()
			r = self.next_int()
			print(l, 2 * l)
Main().solve()


t = int(input())
for __ in range(t):
	(n, k) = map(int, input().split(' '))
	print(n, 2 * n)


t = int(input())
for i in range(t):
	(n, m) = [int(x) for x in input().split()]
	if n == 1:
		print('1 2')
	else:
		print(n, n * 2)


n = int(input())
for i in range(n):
	j = 1
	(l, r) = map(int, input().split())
	while l * j <= r:
		if l != l * j:
			print(l, l * j)
			break
		else:
			j += 1


for _ in range(int(input())):
	(n, m) = [int(x) for x in input().split(' ')]
	print(n, 2 * n)


t = int(input())
while t > 0:
	(l, r) = map(int, input().split())
	print(l, l * 2, sep=' ')
	t -= 1


def f(a, b):
	return (a, 2 * a)
ans = []
n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	ans.append(f(a[0], a[1]))
for i in ans:
	print('{} {}'.format(i[0], i[1]))


t = int(input())
for _ in range(t):
	x = input()
	x = x.split(' ')
	x[0] = int(x[0])
	x[1] = int(x[1])
	if x[1] % x[0] == 0:
		print(x[0], x[1])
	else:
		print(x[0], 2 * x[0])


def core(l, r):
	return '%d %d' % (l, 2 * l)
T = int(input())
for t in range(T):
	(l, r) = (int(s) for s in input().split())
	print(core(l, r))


T = int(input())
for i in range(T):
	(l, r) = list(map(int, input().split()))
	print(l, l + l)


t = int(input())
for j in range(t):
	s = input()
	s = s.split(' ')
	for i in range(len(s)):
		s[i] = int(s[i])
	print(s[0], 2 * s[0])


for i in range(int(input())):
	x = list(map(int, input().split()))
	print(x[0], x[1] - x[1] % x[0])


def solve(l, r):
	return (l, 2 * l)

def main():
	for _ in range(int(input())):
		(l, r) = list(map(int, input().split()))
		print(*solve(l, r))
main()


t = int(input())
for q in range(0, t):
	(l, r) = input().split()
	(l, r) = [int(l), int(r)]
	print(l, 2 * l)


t = int(input())
for j in range(t):
	(l, r) = input().split()
	l = int(l)
	print(l, int(2 * l))


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	while l != r:
		if l * 2 <= r:
			print(l, l * 2)
			break
		else:
			l += 1


a = int(input())
while a > 0:
	(l, r) = input().split()
	print(l, int(l) + int(l))
	a = a - 1


def find_divisible(l, r):
	x = l
	y = x + x
	if y <= r:
		return str(x) + ' ' + str(y)

def solution(inp1, inp2):
	return find_divisible(inp1, inp2)

def main():
	inp1 = input()
	length = int(inp1)
	for i in range(length):
		inp = input().split()
		result = solution(int(inp[0]), int(inp[1]))
		print(result)
main()


count = int(input())
flag = 0
while flag < count:
	out = 0
	inp = input().split()
	out = int(inp[1]) / int(inp[0])
	print(inp[0], int(out) * int(inp[0]))
	flag += 1


def _1096A():
	(l, r) = map(int, input().split())
	for i in range(l, r + 1):
		st = 2
		while True:
			if i * st <= r:
				print(i, i * st)
				return
			else:
				break
for _ in range(int(input())):
	_1096A()


n = int(input())
for i in range(0, n):
	(x, y) = map(int, input().split())
	for i in range(x, y + 1):
		if i * 2 <= y:
			v = i
			u = 2 * i
			break
	print(v, u)


R = lambda : map(int, input().split())
t = int(input())
while t > 0:
	t = t - 1
	(l, r) = R()
	if l == 1:
		print(l, r)
	else:
		for i in range(l, r):
			if i * 2 <= r:
				print(i, i * 2)
				break


T = input()
outputs = []
for each in range(int(T)):
	(l, r) = [int(e) for e in input().split()]
	outputs.append([l, l * 2])
for e in outputs:
	print('{} {}'.format(e[0], e[1]))


n = input()
n = int(n)
q = []
for i in range(n):
	(x, y) = input().split(' ')
	x = int(x)
	q.append(x)
for j in q:
	print(j, end=' ')
	print(2 * j)


T = int(input())
for i in range(T):
	(l, r) = [int(x) for x in input().split()]
	if l == 1:
		print(l, r)
	else:
		c = r - l + 1
		if c > l:
			print(l, 2 * l)


n = int(input())
for i in range(n):
	(x, y) = [int(j) for j in input().split()]
	print(x, 2 * x)


n = int(input())
for i in range(n):
	(l, r) = [int(x) for x in input().split()]
	check = 0
	while l < r:
		for j in range(2 * l, r + 1):
			if j % l == 0:
				check = 1
				print(l, j)
				break
		l += 1
		if check == 1:
			break


a = []
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	a.append(l)
for i in range(t):
	print(a[i], 2 * a[i])


case = int(input())
for caseNum in range(0, case):
	(a, b) = [int(x) for x in input().split()]
	print(a, 2 * a)


for _ in range(int(input())):
	(x, _2) = map(int, input().split())
	print(x, x * 2)


t = int(input())
if 1 <= t <= 1000:
	for i in range(t):
		(l, r) = input().split()
		l = int(l)
		r = int(r)
		p = r - l
		m = l - 1
		li = []
		for i in range(p):
			m += 1
			li.append(m)
			y = 2 * m
			if m != y:
				print(m, y)
				break


T = int(input())
for i in range(T):
	s = input()
	s = s.split()
	l = int(s[0])
	r = int(s[1])
	x = l
	y = 2 * l
	print(x, y)


def main():
	n = int(input())
	for i in range(n):
		(x, y) = map(int, input().split(' '))
		print(x, x * 2)
main()


n = int(input())
for t in range(n):
	(z1, z2) = map(int, input().split())
	print(z1, 2 * z1)


T = int(input())
ansL = []
for i in range(T):
	(x, y) = map(int, input().split())
	ansL.append(x)
for j in ansL:
	print(j, 2 * j)


n = int(input())
for i in range(n):
	count = 0
	(l, m) = map(int, input().split())
	for i in range(l, m + 1, 1):
		if 2 * i in range(l, m + 1, 1):
			print(i, end=' ')
			print(2 * i)
			count += 1
			break


def main():
	c = int(input())
	vals = [[int(d) for d in input().split()] for v in range(c)]
	for v in vals:
		(a, b) = v
		print(a, a * 2)
main()


t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	a = n
	b = n + n
	print(a, b)


t = int(input())
result = []
for i in range(t):
	line = input().split()
	l = int(line[0])
	r = int(line[1])
	if l == r:
		result.append([l, r])
	else:
		result.append([l, l * 2])
for out in result:
	print('%d %d' % (out[0], out[1]))


t = int(input())
for __ in range(t):
	(l, r) = map(int, input().split())
	(x, y) = (l, r)
	if r % l == 0:
		print(x, y)
	else:
		y -= y % x
		print(x, y)


t = int(input())
while t:
	(x, y) = list(map(int, input().split()))
	print(x, 2 * x)
	t -= 1


input1 = input()
for i in range(int(input1)):
	input2 = input()
	first = int(input2.split()[0])
	second = int(input2.split()[1])
	print(str(first) + ' ' + str(first * 2))


n = int(input())
while n > 0:
	(l, r) = input().split(' ')
	l = int(l)
	r = int(r)
	print(l, end=' ')
	print(2 * l)
	n -= 1


T = int(input())
xList = []
yList = []
for i in range(T):
	inp = list(map(int, input().split(' ')))
	l = inp[0]
	r = inp[1]
	if r % l == 0:
		xList.append(l)
		yList.append(r)
	elif r - r % l != l:
		xList.append(l)
		yList.append(r - r % l)
	elif l + r % l != r:
		xList.append(l + r % l)
		yList.append(r)
for i in range(len(xList)):
	print(xList[i], yList[i])


ans = []
for i in range(int(input())):
	(l, r) = list(map(int, input().split()))
	ans.append([l, 2 * l])
for i in ans:
	print(*i)


def solve():
	t = int(input())
	for i in range(t):
		s = input()
		(l, r) = map(int, s.split())
		print(l, l * 2)
solve()


for _ in range(int(input())):
	s = input().split()
	x = int(s[0])
	print('%d %d' % (x, x * 2))


from __future__ import division, print_function
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
from math import ceil, floor, log, sqrt, factorial, pow, pi

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p1
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph():
	d = {}
	(v, e) = mi()
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(l, n):
	d = {}
	for i in range(1, n + 1):
		if i not in d.keys():
			d[i] = l[i]
		else:
			d[i].append(l[i])
	return d
t = ii()
for a0 in range(t):
	(l, r) = mi()
	print(l, 2 * l)


n = int(input())
g = []
for i in range(n):
	(l, r) = map(int, input().split())
	for i in range(l, r):
		if i * 2 <= r:
			g.append([i, i * 2])
			break
for i in g:
	print(i[0], i[1])


t = int(input())
for _ in range(t):
	x = int(input().split()[0])
	print(x, x + x)


import sys

def solve(io):
	T = io.read_int()
	for _ in range(0, T):
		L = io.read_int()
		io.read_int()
		io.println(L, L << 1)

class IO:
	in_stream = None
	out_stream = None
	raw = ''
	buf = []
	pos = 0

	def __init__(self, input_stream, output_stream):
		self.in_stream = input_stream
		self.out_stream = output_stream

	def read_to_buffer(self):
		self.raw = self.in_stream.readline().rstrip('\n')
		self.buf = self.raw.split()
		self.pos = 0

	def read_string(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		ans = self.buf[self.pos]
		self.pos += 1
		return ans

	def read_int(self):
		return int(self.read_string())

	def read_float(self):
		return float(self.read_string())

	def read_string_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_string())
		return arr

	def read_int_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_int())
		return arr

	def read_float_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_float())
		return arr

	def read_line(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		if self.pos > 0:
			raise ValueError('Cannot call read_line in the middle of a line.')
		self.pos = len(self.buf)
		return self.raw

	def print(self, *args):
		self.out_stream.write(' '.join([str(x) for x in args]))

	def println(self, *args):
		self.print(*args)
		self.print('\n')

	def println_array(self, arr, sep=' '):
		self.println(sep.join((str(x) for x in arr)))

	def flush_output(self):
		self.out_stream.flush()
pythonIO = IO(sys.stdin, sys.stdout)
solve(pythonIO)
pythonIO.flush_output()


x = int(input())
c = 0
for i in range(x):
	(l, r) = map(int, input().split())
	print(l, l * 2)


def divisors(M):
	d = []
	i = 1
	while M >= i ** 2:
		if M % i == 0:
			d.append(i)
			if i ** 2 != M:
				d.append(M // i)
		i = i + 1
	return d

def popcount(x):
	x = x - (x >> 1 & 1431655765)
	x = (x & 858993459) + (x >> 2 & 858993459)
	x = x + (x >> 4) & 252645135
	x = x + (x >> 8)
	x = x + (x >> 16)
	return x & 127

def eratosthenes(n):
	res = [0 for i in range(n + 1)]
	prime = set([])
	for i in range(2, n + 1):
		if not res[i]:
			prime.add(i)
			for j in range(1, n // i + 1):
				res[i * j] = 1
	return prime

def factorization(n):
	res = []
	for p in prime:
		if n % p == 0:
			while n % p == 0:
				n //= p
			res.append(p)
	if n != 1:
		res.append(n)
	return res

def euler_phi(n):
	res = n
	for x in range(2, n + 1):
		if x ** 2 > n:
			break
		if n % x == 0:
			res = res // x * (x - 1)
			while n % x == 0:
				n //= x
	if n != 1:
		res = res // n * (n - 1)
	return res

def ind(b, n):
	res = 0
	while n % b == 0:
		res += 1
		n //= b
	return res

def isPrimeMR(n):
	if n == 1:
		return 0
	d = n - 1
	d = d // (d & -d)
	L = [2, 3, 5, 7, 11, 13, 17]
	for a in L:
		t = d
		y = pow(a, t, n)
		if y == 1:
			continue
		while y != n - 1:
			y = y * y % n
			if y == 1 or t == n - 1:
				return 0
			t <<= 1
	return 1

def findFactorRho(n):
	from math import gcd
	m = 1 << n.bit_length() // 8
	for c in range(1, 99):
		f = lambda x: (x * x + c) % n
		(y, r, q, g) = (2, 1, 1, 1)
		while g == 1:
			x = y
			for i in range(r):
				y = f(y)
			k = 0
			while k < r and g == 1:
				ys = y
				for i in range(min(m, r - k)):
					y = f(y)
					q = q * abs(x - y) % n
				g = gcd(q, n)
				k += m
			r <<= 1
		if g == n:
			g = 1
			while g == 1:
				ys = f(ys)
				g = gcd(abs(x - ys), n)
		if g < n:
			if isPrimeMR(g):
				return g
			elif isPrimeMR(n // g):
				return n // g
			return findFactorRho(g)

def primeFactor(n):
	i = 2
	ret = {}
	rhoFlg = 0
	while i * i <= n:
		k = 0
		while n % i == 0:
			n //= i
			k += 1
		if k:
			ret[i] = k
		i += 1 + i % 2
		if i == 101 and n >= 2 ** 20:
			while n > 1:
				if isPrimeMR(n):
					(ret[n], n) = (1, 1)
				else:
					rhoFlg = 1
					j = findFactorRho(n)
					k = 0
					while n % j == 0:
						n //= j
						k += 1
					ret[j] = k
	if n > 1:
		ret[n] = 1
	if rhoFlg:
		ret = {x: ret[x] for x in sorted(ret)}
	return ret

def divisors(n):
	res = [1]
	prime = primeFactor(n)
	for p in prime:
		newres = []
		for d in res:
			for j in range(prime[p] + 1):
				newres.append(d * p ** j)
		res = newres
	res.sort()
	return res

def xorfactorial(num):
	if num == 0:
		return 0
	elif num == 1:
		return 1
	elif num == 2:
		return 3
	elif num == 3:
		return 0
	else:
		x = baseorder(num)
		return 2 ** x * ((num - 2 ** x + 1) % 2) + function(num - 2 ** x)

def xorconv(n, X, Y):
	if n == 0:
		res = [X[0] * Y[0] % mod]
		return res
	x = [X[i] + X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	y = [Y[i] + Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	z = [X[i] - X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	w = [Y[i] - Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	res1 = xorconv(n - 1, x, y)
	res2 = xorconv(n - 1, z, w)
	former = [(res1[i] + res2[i]) * inv for i in range(2 ** (n - 1))]
	latter = [(res1[i] - res2[i]) * inv for i in range(2 ** (n - 1))]
	former = list(map(lambda x: x % mod, former))
	latter = list(map(lambda x: x % mod, latter))
	return former + latter

def merge_sort(A, B):
	(pos_A, pos_B) = (0, 0)
	(n, m) = (len(A), len(B))
	res = []
	while pos_A < n and pos_B < m:
		(a, b) = (A[pos_A], B[pos_B])
		if a < b:
			res.append(a)
			pos_A += 1
		else:
			res.append(b)
			pos_B += 1
	res += A[pos_A:]
	res += B[pos_B:]
	return res

class UnionFindVerSize:

	def __init__(self, N):
		self._parent = [n for n in range(0, N)]
		self._size = [1] * N
		self.group = N

	def find_root(self, x):
		if self._parent[x] == x:
			return x
		self._parent[x] = self.find_root(self._parent[x])
		stack = [x]
		while self._parent[stack[-1]] != stack[-1]:
			stack.append(self._parent[stack[-1]])
		for v in stack:
			self._parent[v] = stack[-1]
		return self._parent[x]

	def unite(self, x, y):
		gx = self.find_root(x)
		gy = self.find_root(y)
		if gx == gy:
			return
		self.group -= 1
		if self._size[gx] < self._size[gy]:
			self._parent[gx] = gy
			self._size[gy] += self._size[gx]
		else:
			self._parent[gy] = gx
			self._size[gx] += self._size[gy]

	def get_size(self, x):
		return self._size[self.find_root(x)]

	def is_same_group(self, x, y):
		return self.find_root(x) == self.find_root(y)

class WeightedUnionFind:

	def __init__(self, N):
		self.parent = [i for i in range(N)]
		self.size = [1 for i in range(N)]
		self.val = [0 for i in range(N)]
		self.flag = True
		self.edge = [[] for i in range(N)]

	def dfs(self, v, pv):
		stack = [(v, pv)]
		new_parent = self.parent[pv]
		while stack:
			(v, pv) = stack.pop()
			self.parent[v] = new_parent
			for (nv, w) in self.edge[v]:
				if nv != pv:
					self.val[nv] = self.val[v] + w
					stack.append((nv, v))

	def unite(self, x, y, w):
		if not self.flag:
			return
		if self.parent[x] == self.parent[y]:
			self.flag = self.val[x] - self.val[y] == w
			return
		if self.size[self.parent[x]] > self.size[self.parent[y]]:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[x] += self.size[y]
			self.val[y] = self.val[x] - w
			self.dfs(y, x)
		else:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[y] += self.size[x]
			self.val[x] = self.val[y] + w
			self.dfs(x, y)

class Dijkstra:

	class Edge:

		def __init__(self, _to, _cost):
			self.to = _to
			self.cost = _cost

	def __init__(self, V):
		self.G = [[] for i in range(V)]
		self._E = 0
		self._V = V

	@property
	def E(self):
		return self._E

	@property
	def V(self):
		return self._V

	def add_edge(self, _from, _to, _cost):
		self.G[_from].append(self.Edge(_to, _cost))
		self._E += 1

	def shortest_path(self, s):
		import heapq
		que = []
		d = [10 ** 15] * self.V
		d[s] = 0
		heapq.heappush(que, (0, s))
		while len(que) != 0:
			(cost, v) = heapq.heappop(que)
			if d[v] < cost:
				continue
			for i in range(len(self.G[v])):
				e = self.G[v][i]
				if d[e.to] > d[v] + e.cost:
					d[e.to] = d[v] + e.cost
					heapq.heappush(que, (d[e.to], e.to))
		return d

def Z_algorithm(s):
	N = len(s)
	Z_alg = [0] * N
	Z_alg[0] = N
	i = 1
	j = 0
	while i < N:
		while i + j < N and s[j] == s[i + j]:
			j += 1
		Z_alg[i] = j
		if j == 0:
			i += 1
			continue
		k = 1
		while i + k < N and k + Z_alg[k] < j:
			Z_alg[i + k] = Z_alg[k]
			k += 1
		i += k
		j -= k
	return Z_alg

class BIT:

	def __init__(self, n, mod=None):
		self.BIT = [0] * (n + 1)
		self.num = n
		self.mod = mod

	def query(self, idx):
		res_sum = 0
		mod = self.mod
		while idx > 0:
			res_sum += self.BIT[idx]
			if mod:
				res_sum %= mod
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		mod = self.mod
		while idx <= self.num:
			self.BIT[idx] += x
			self.BIT[idx] %= mod
			idx += idx & -idx
		return

class dancinglink:

	def __init__(self, n, debug=False):
		self.n = n
		self.debug = debug
		self._left = [i - 1 for i in range(n)]
		self._right = [i + 1 for i in range(n)]
		self.exist = [True for i in range(n)]

	def pop(self, k):
		if self.debug:
			assert self.exist[k]
		L = self._left[k]
		R = self._right[k]
		if L != -1:
			if R != self.n:
				(self._right[L], self._left[R]) = (R, L)
			else:
				self._right[L] = self.n
		elif R != self.n:
			self._left[R] = -1
		self.exist[k] = False

	def left(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._left[res]
			if res == -1:
				break
			k -= 1
		return res

	def right(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._right[res]
			if res == self.n:
				break
			k -= 1
		return res

class SparseTable:

	def __init__(self, A, merge_func, ide_ele):
		N = len(A)
		n = N.bit_length()
		self.table = [[ide_ele for i in range(n)] for i in range(N)]
		self.merge_func = merge_func
		for i in range(N):
			self.table[i][0] = A[i]
		for j in range(1, n):
			for i in range(0, N - 2 ** j + 1):
				f = self.table[i][j - 1]
				s = self.table[i + 2 ** (j - 1)][j - 1]
				self.table[i][j] = self.merge_func(f, s)

	def query(self, s, t):
		b = t - s + 1
		m = b.bit_length() - 1
		return self.merge_func(self.table[s][m], self.table[t - 2 ** m + 1][m])

class BinaryTrie:

	class node:

		def __init__(self, val):
			self.left = None
			self.right = None
			self.max = val

	def __init__(self):
		self.root = self.node(-10 ** 15)

	def append(self, key, val):
		pos = self.root
		for i in range(29, -1, -1):
			pos.max = max(pos.max, val)
			if key >> i & 1:
				if pos.right is None:
					pos.right = self.node(val)
					pos = pos.right
				else:
					pos = pos.right
			elif pos.left is None:
				pos.left = self.node(val)
				pos = pos.left
			else:
				pos = pos.left
		pos.max = max(pos.max, val)

	def search(self, M, xor):
		res = -10 ** 15
		pos = self.root
		for i in range(29, -1, -1):
			if pos is None:
				break
			if M >> i & 1:
				if xor >> i & 1:
					if pos.right:
						res = max(res, pos.right.max)
					pos = pos.left
				else:
					if pos.left:
						res = max(res, pos.left.max)
					pos = pos.right
			elif xor >> i & 1:
				pos = pos.right
			else:
				pos = pos.left
		if pos:
			res = max(res, pos.max)
		return res

def solveequation(edge, ans, n, m):
	x = [0] * m
	used = [False] * n
	for v in range(n):
		if used[v]:
			continue
		y = dfs(v)
		if y != 0:
			return False
	return x

	def dfs(v):
		used[v] = True
		r = ans[v]
		for (to, dire, id) in edge[v]:
			if used[to]:
				continue
			y = dfs(to)
			if dire == -1:
				x[id] = y
			else:
				x[id] = -y
			r += y
		return r

class Matrix:
	mod = 10 ** 9 + 7

	def set_mod(m):
		Matrix.mod = m

	def __init__(self, L):
		self.row = len(L)
		self.column = len(L[0])
		self._matrix = L
		for i in range(self.row):
			for j in range(self.column):
				self._matrix[i][j] %= Matrix.mod

	def __getitem__(self, item):
		if type(item) == int:
			raise IndexError('you must specific row and column')
		elif len(item) != 2:
			raise IndexError('you must specific row and column')
		(i, j) = item
		return self._matrix[i][j]

	def __setitem__(self, item, val):
		if type(item) == int:
			raise IndexError('you must specific row and column')
		elif len(item) != 2:
			raise IndexError('you must specific row and column')
		(i, j) = item
		self._matrix[i][j] = val

	def __add__(self, other):
		if (self.row, self.column) != (other.row, other.column):
			raise SizeError('sizes of matrixes are different')
		res = [[0 for j in range(self.column)] for i in range(self.row)]
		for i in range(self.row):
			for j in range(self.column):
				res[i][j] = self._matrix[i][j] + other._matrix[i][j]
				res[i][j] %= Matrix.mod
		return Matrix(res)

	def __sub__(self, other):
		if (self.row, self.column) != (other.row, other.column):
			raise SizeError('sizes of matrixes are different')
		res = [[0 for j in range(self.column)] for i in range(self.row)]
		for i in range(self.row):
			for j in range(self.column):
				res[i][j] = self._matrix[i][j] - other._matrix[i][j]
				res[i][j] %= Matrix.mod
		return Matrix(res)

	def __mul__(self, other):
		if type(other) != int:
			if self.column != other.row:
				raise SizeError('sizes of matrixes are different')
			res = [[0 for j in range(other.column)] for i in range(self.row)]
			for i in range(self.row):
				for j in range(other.column):
					temp = 0
					for k in range(self.column):
						temp += self._matrix[i][k] * other._matrix[k][j]
					res[i][j] = temp % Matrix.mod
			return Matrix(res)
		else:
			n = other
			res = [[n * self._matrix[i][j] % Matrix.mod for j in range(self.column)] for i in range(self.row)]
			return Matrix(res)

	def __pow__(self, m):
		if self.column != self.row:
			raise MatrixPowError('the size of row must be the same as that of column')
		n = self.row
		res = Matrix([[int(i == j) for i in range(n)] for j in range(n)])
		while m:
			if m % 2 == 1:
				res = res * self
			self = self * self
			m //= 2
		return res

	def __str__(self):
		res = []
		for i in range(self.row):
			for j in range(self.column):
				res.append(str(self._matrix[i][j]))
				res.append(' ')
			res.append('\n')
		res = res[:len(res) - 1]
		return ''.join(res)

class SegmentTree:

	def __init__(self, init_val, segfunc, ide_ele):
		n = len(init_val)
		self.segfunc = segfunc
		self.ide_ele = ide_ele
		self.num = 1 << (n - 1).bit_length()
		self.tree = [ide_ele] * 2 * self.num
		for i in range(n):
			self.tree[self.num + i] = init_val[i]
		for i in range(self.num - 1, 0, -1):
			self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

	def update(self, k, x):
		k += self.num
		self.tree[k] = x
		while k > 1:
			self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
			k >>= 1

	def query(self, l, r):
		res = self.ide_ele
		l += self.num
		r += self.num
		while l < r:
			if l & 1:
				res = self.segfunc(res, self.tree[l])
				l += 1
			if r & 1:
				res = self.segfunc(res, self.tree[r - 1])
			l >>= 1
			r >>= 1
		return res

	def bisect_l(self, l, r, x):
		l += self.num
		r += self.num
		Lmin = -1
		Rmin = -1
		while l < r:
			if l & 1:
				if self.tree[l] <= x and Lmin == -1:
					Lmin = l
				l += 1
			if r & 1:
				if self.tree[r - 1] <= x:
					Rmin = r - 1
			l >>= 1
			r >>= 1
		if Lmin != -1:
			pos = Lmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		elif Rmin != -1:
			pos = Rmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		else:
			return -1
import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import log, gcd
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
for _ in range(int(input())):
	(l, r) = mi()
	assert 2 * l <= r
	print(l, 2 * l)


query = int(input())
for _ in range(query):
	(l, r) = map(int, input().split())
	if r >= 2 * l:
		print(l, 2 * l)


def solution():
	T = int(input())
	(l, r) = (0, 0)
	while T > 0:
		T -= 1
		(l, r) = [int(x) for x in input().split()]
		print(l, ' ', l * 2)
solution()


q = int(input())
while q:
	(l, r) = input().split()
	r = int(r)
	l = int(l)
	x = l * 2
	y = r // 2
	if x <= r:
		print(l, x)
	else:
		print(r, y)
	q -= 1


t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().split()))
	print('{} {}'.format(a, a * 2))


def answer():
	n = int(input())
	while n:
		a = [int(x) for x in input().split()]
		low = a[0]
		high = a[1]
		if low == 1:
			print('1', str(high))
		else:
			print(low, 2 * low)
		n -= 1
answer()


l = int(input())
for k in range(l):
	(a, b) = map(int, input().split())
	print(a, a * 2)


t = int(input())
tr = False
for i in range(t):
	(l, r) = map(int, input().split())
	print(l, l * 2)


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify, nlargest
from copy import deepcopy
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_1():
	return list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))

def inps():
	return sys.stdin.readline()

def inpsl(x):
	tmp = sys.stdin.readline()
	return tmp[:x]

def err(x):
	print(x)
	exit()
for _ in range(inp()):
	(l, r) = inpl()
	y = r // l * l
	print(l, y)


def ans(l, r):
	i = l
	while i <= r:
		if i * 2 <= r:
			return [i, i * 2]
t = int(input())
for _ in range(t):
	lr = list(map(int, input().strip().split()))
	print(*ans(lr[0], lr[1]))


def solve(rem_tests):
	if not rem_tests:
		return
	(l, r) = map(int, input().split())
	print('%d %d' % (l, 2 * l))
	solve(rem_tests - 1)
t = int(input())
solve(t)


def solve(g):
	print('{} {}'.format(g[0], g[0] * 2))

def main():
	for i in range(int(input())):
		solve([int(x) for x in input().split()])
main()


T = int(input())
src = [tuple(map(int, input().split())) for i in range(T)]
for (l, r) in src:
	a = r // 2
	b = a * 2
	print(a, b)


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	for tc in range(int(input())):
		(l, r) = get_ints()
		print(l, 2 * l)
main()


T = int(input())
for i in range(0, T):
	(l, r) = (int(t) for t in input().split())
	x = l
	y = r
	print(x, x * 2)


t = int(input())
for _ in range(t):
	(l, r) = (int(x) for x in input().split())
	print(str(l) + ' ' + str(2 * l))


t = int(input())
l_r_list = []
for i in range(t):
	l_r_list.append(list(map(int, input().split())))
for i in l_r_list:
	print(i[0], i[0] * 2)


test = int(input())
while test:
	test = test - 1
	s = list(map(int, input().split(' ')))
	l = s[0]
	r = s[1]
	k = 1
	for x in range(l, r):
		t = x * 2
		if t <= r:
			print(x, end=' ')
			print(t)
			break


T = int(input())
for k in range(T):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)


import sys
import math
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l == 1:
		print(l, r)
	else:
		print(l, l * 2)


t = int(input())
for i in range(t):
	ans = False
	(lower, upper) = map(int, input().strip().split())
	for i in range(lower * 2, upper + 1):
		if i % lower == 0:
			print(lower, i)
			ans = True
			break


t = int(input())
for x in range(t):
	k = 0
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2, sep=' ', end='\n')
	else:
		for i in range(l, r):
			for j in range(l + 1, r + 1):
				if j % i == 0:
					print(i, j, sep=' ', end='\n')
					k = 1
					break
			if k == 1:
				break


def mi():
	return map(int, input().split(' '))
for i in range(int(input())):
	(l, r) = mi()
	print(l, 2 * l)


T = int(input())
while T:
	(a, b) = list(map(int, input().split()))
	print(a, 2 * a)
	T -= 1


t = int(input())
for _ in range(t):
	s = input()
	s = s.split(' ')
	(l, r) = (int(s[0]), int(s[1]))
	for i in range(l, r - l + 1):
		if 2 * i <= r:
			print(i, 2 * i)
			break


def divisible(n):
	if n[0] * 2 <= n[1]:
		return [n[0], n[0] * 2]
tc = int(input())
for i in range(tc):
	n = list(map(int, input().split()))
	print(*divisible(n))


for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	for j in range(a, b + 1):
		t = b // j
		if j != j * t and j * t > j:
			print(j, j * t)
			break


def answ(l, r):
	if 2 * l <= r:
		print(l, 2 * l)
		return
	for i in range(l, r + 1):
		for j in range(i + 1, r + 1):
			if j % i == 0:
				print(i, j)
				return
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	answ(l, r)


t = int(input())

def f(l):
	print(l, 2 * l)
for i in range(t):
	(l, r) = map(int, input().split())
	f(l)


n = int(input())
l = []
for i in range(n):
	j = input()
	(a, b) = tuple(map(int, j.split()))
	l.append((a, b))
for k in range(len(l)):
	a = l[k][0]
	b = l[k][1]
	for m in range(a, b + 1):
		if m * 2 <= b:
			print(m, m * 2)
			break


n = int(input())
for q in range(n):
	(l, r) = map(int, input().strip().split())
	print(str(l) + ' ' + str(l * 2))


def div(a, b):
	x = a
	y = 2 * a
	return (x, y)
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	print(*div(a, b))


for T in range(int(input())):
	(L, R) = map(int, input().split())
	print(L, L << 1)


import re, math, decimal, bisect

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return [int(_) for _ in input().strip().split()]
for t in range(iread()):
	(l, r) = viread()
	if l == 1:
		print(l, l + 1)
	else:
		print(l, l + l)


import math
import collections
import bisect
import heapq
import time
import itertools
import sys
T = int(input())
ans = []
for ti in range(T):
	(l, r) = map(int, input().split())
	ans.append((l, 2 * l))
print('\n'.join(['{} {}'.format(x, y) for (x, y) in ans]))


for i in range(0, int(input())):
	(l, r) = map(int, input().split())
	for j in range(l, r + 1):
		x = j
		if x * 2 <= r:
			print(x, x * 2)
			break
		else:
			continue


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = [LI() for _ in range(n)]
	return '\n'.join(map(lambda x: '{} {}'.format(x[0], x[0] * 2), a))
print(main())


a = int(input())
for i in range(a):
	gg = input().split()
	print(gg[0], int(gg[0]) * 2)


tc = int(input())
for _ in range(tc):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(l, l)


n = input()
l = []
r = []
for i in range(int(n)):
	(__l, __r) = [int(iter) for iter in input().split(' ')]
	l.append(__l)
	r.append(__r)
for i in range(int(n)):
	print('{} {}'.format(l[i], l[i] * 2))


t = int(input())
for k in range(t):
	(l, r) = map(int, input().split())
	for x in range(l, r + 1):
		if x == 1:
			print(x, x + 1)
			break
		elif 2 * x <= r:
			print(x, 2 * x)
			break


def work(x, y):
	if x * 2 <= y:
		return str(x) + ' ' + str(x * 2)

def main():
	n = int(input())
	for i in range(n):
		(x, y) = map(int, input().split())
		print(work(x, y))
main()


T = int(input())
l_0 = []
l_1 = []
for i in range(T):
	ranger = input().split()
	lranger = [int(x) for x in ranger]
	l_0.append(lranger[0])
	l_1.append(lranger[1])
for i in range(T):
	if l_1[i] % l_0[i] == 0:
		print(l_0[i], l_1[i])
	else:
		rest = l_1[i] % l_0[i]
		print(l_0[i], l_1[i] - rest)


t = int(input())
for j in range(t):
	(l, r) = map(int, input().split(' '))
	k = True
	while k:
		if l << 1 <= r:
			print(l, l << 1)
			break
		l += 1


t = int(input())
for i in range(0, t):
	a = input().split()
	x = int(a[0])
	y = int(a[1])
	z = int(y / x)
	y = x * z
	ans = str(x) + ' ' + str(y)
	print(ans)


T = int(input())
for t in range(T):
	(L, R) = [int(a) for a in input().split()]
	print(L, 2 * L)


n = int(input())
for i in range(n):
	(L, R) = map(int, input().split())
	print(L, L * 2)


t = int(input())
for i in range(t):
	st = [int(i) for i in input().split(' ')]
	a = st[0]
	b = st[1]
	print(a, a * 2, sep=' ', end=' ')


n = int(input())
a = []
for j in range(n):
	flag = 0
	(l, r) = map(int, input().split())
	a.append([l, 2 * l])
for i in range(len(a)):
	print(a[i][0], a[i][1])


t = int(input())
for _t in range(t):
	q = input().split()
	l = int(q[0])
	r = int(q[1])
	for i in range(l, r + 1):
		flag = False
		j = i * 2
		while j < r + 1:
			if l <= j and j <= r:
				print(i, j)
				flag = True
				break
			else:
				j += i
		if flag:
			break


n = int(input())
l = []
for i in range(n):
	ch = input()
	(a, b) = ch.split(' ')
	l.append(int(a))
	l.append(int(b))
for i in range(n):
	print(str(l[2 * i]) + ' ' + str(l[2 * i] * 2))


t = int(input())
for p in range(t):
	(l, r) = [int(x) for x in input().strip().split()]
	print(l, 2 * l)


n = int(input(''))
for i in range(n):
	x = str(input(''))
	a = x.split(' ')
	print(int(a[0], 0), ' ', int(a[0], 0) * 2)


def print_divisible_pair(a, b):
	print(str(a) + ' ' + str(2 * a))
for i in range(int(input())):
	(a, b) = map(int, input().split())
	print_divisible_pair(a, b)


def runner():
	iters = input()
	for i in range(int(iters)):
		values = input()
		a = values.split()[0]
		b = int(a) * 2
		print(a, b)
runner()


a = int(input())
for x in range(a):
	(a, b) = map(int, input().split())
	if int(b / 2) >= a:
		print(int(b / 2), int(b / 2) * 2)
	elif a == 1:
		print(a, b)