AtCoder Regular Contest 200 (Div. 2)
B
LCM
AtCoder
⌀ 1543
原题
← AC →
翻译中…

Problem Statement

翻译中…

You are given positive integers $A_1,A_2,A_3$.

翻译中…

Determine whether there exists a pair of positive integers $(X_1,X_2)$ that satisfies all the following conditions, and if it exists, find one.

翻译中…
  • $X_1$ is an integer with $A_1$ digits in decimal notation.
  • $X_2$ is an integer with $A_2$ digits in decimal notation.
  • The least common multiple of $X_1$ and $X_2$ is an integer with $A_3$ digits in decimal notation.
翻译中…

You are given $T$ test cases, so find the answer for each.

翻译中…

Constraints

翻译中…
  • $1\le T\le 17^3$
  • $1\le A_1,A_2,A_3\le 17$
  • All input values are integers.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T

翻译中…

Each test case is given in the following format:

翻译中…

A_1 A_2 A_3

翻译中…

Output

翻译中…

Output your solutions for the test cases in order, separated by newlines.

翻译中…

For each test case, if there is no $(X_1,X_2)$ that satisfies all conditions, output No.

翻译中…

Otherwise, output a $(X_1,X_2)$ that satisfies all conditions in the following format:

翻译中…

Yes
X_1 X_2

翻译中…

If there are multiple $(X_1,X_2)$ that satisfy the conditions, you may output any of them.

翻译中…

样例

Input #1
3
4 3 5
1 1 7
8 6 11
Output #1
Yes
2025 200
No
Yes
20250615 200200
For the first test case, if we set $(X_1,X_2)=(2025,200)$, then the least common multiple of $X_1,X_2$ is $16200$, which satisfies the conditions. Other examples that satisfy the conditions include $(X_1,X_2)=(2025,125),(7777,231)$.
题目信息
题号
arc200_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。