U264427 Hello World
题目背景
> *At the first* **YUAN** *made the heaven and the earth.*
>
> *And the earth was waste and without form;*
>
> *and it was dark on the face of the deep;*
>
> *and the Spirit of* **YUAN** *was moving on the face of the waters.*
>
> *And* **YUAN** *said, Hello World: and there was the world.*
**源神** 有无穷无尽的源力,**源神** 用无尽的源力创造了世界,而 **源神** 的源力来自于无限循环小数。
对于一个无限循环小数,我们可以将其表示为$\frac{A}{B}$的分式,为了准确表示一个无限循环小数,**源神** 决定将其表示为分式。
题目描述
作为 **源神** 忠诚的仆从,你将得到一个无限循环小数$y$的一个循环节,这里,保证$0
输入格式
包含$T$组输入,第一行一个正整数$T$,其中$T\leq 10^6$。
接下来$T$行,每行一个串$S$,表示一个循环节,其中$len(S)\leq18$。
输出格式
$T$行,每行两个正整数$A, B$,表示分式$\frac{A}{B}$,要求$A, B$互质。
说明/提示
对于样例1,有:
$\frac{1}{3}=0.\dot{3}$
$\frac{1}{7}=0.\dot{1}4285\dot{7}$