CF1096A.Find Divisible

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Find Divisible

You are given a range of positive integers from ll to rr.

Find such a pair of integers (x,y)(x, y) that lx,yrl \le x, y \le r, xyx \ne y and xx divides yy.

If there are multiple answers, print any of them.

You are also asked to answer TT independent queries.

Input

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

Each of the next TT lines contains two integers ll and rr (1lr9982443531 \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 TT lines, each line should contain the answer — two integers xx and yy such that lx,yrl \le x, y \le r, xyx \ne y and xx divides yy. The answer in the ii-th line should correspond to the ii-th query from the input.

If there are multiple answers, print any of them.

Samples

3
1 10
3 14
1 10
1 7
3 9
5 10

在线编程 IDE

建议全屏模式获得最佳体验