logo AlgoBeat OnlineJudge
登录 注册

#210688. [HBCPC2024] Long Live

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

In Minecraft, there are three dimensions in the simple world, one of which is known as “The End”. In this dimension, the Ender Dragon is usually symbolized as the final boss of Minecraft.

Now we, you, and Steve want to beat the dragon. However, we find that the dragon is telling a puzzle. We must solve it before fighting against the dragon. Please stand by our side to fight against the dragon. The puzzle goes as follows.

Given two positive integers and , please find two integers and , such that

and to maximize .

Here, represents the greatest common divisor of , while represents the least common multiple of .

输入格式

The first line contains an integer indicating the number of test cases.

Of the following lines, each contains two integers and , representing the puzzle.

输出格式

Output lines. Each contains two integers and , indicating the answer to each test case.

样例

样例输入 1

2
1 1
4 4

样例输出 1

1 1
1 1

数据范围与提示

Dear all participants:

This problem may be the very first page, but not where the story line ends. Please believe in yourself all the time, wishing you with my singing, “Long live all the mountains we moved, I had the time of my life fighting dragons with you”.