NSD
Easy
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
Find an array consisting of positive integers (also known as natural numbers) that meets specified constraints:
Here, denotes the greatest common divisor.
Input
The first line contains two integers, and ().
Each of the following lines contains three integers: , , and (, ).
Output
If such an array exists, output integers ().
If no such array can be constructed, output .
Examples
Input #1
Answer #1
Input #2
Answer #2
Scoring
(21 points): ; ;
(30 points): ;
(49 points): no additional constraints.
Submissions 110
Acceptance rate 20%