Codeforces Round 586 (Div. 1 + Div. 2)
B
Multiplication Table
Codeforces
1300
原题
← AC →
翻译中…

Sasha grew up and went to first grade. To celebrate this event her mother bought her a multiplication table $M$ with $n$ rows and $n$ columns such that $M_{ij}=a_i \cdot a_j$ where $a_1, \dots, a_n$ is some sequence of positive integers.

翻译中…

Of course, the girl decided to take it to school with her. But while she was having lunch, hooligan Grisha erased numbers on the main diagonal and threw away the array $a_1, \dots, a_n$. Help Sasha restore the array!

翻译中…

Input

翻译中…

The first line contains a single integer $n$ ($3 \leqslant n \leqslant 10^3$), the size of the table.

翻译中…

The next $n$ lines contain $n$ integers each. The $j$-th number of the $i$-th line contains the number $M_{ij}$ ($1 \leq M_{ij} \leq 10^9$). The table has zeroes on the main diagonal, that is, $M_{ii}=0$.

翻译中…

Output

翻译中…

In a single line print $n$ integers, the original array $a_1, \dots, a_n$ ($1 \leq a_i \leq 10^9$). It is guaranteed that an answer exists. If there are multiple answers, print any.

翻译中…

样例

Input #1
5
0 4 6 2 4
4 0 6 2 4
6 6 0 3 6
2 2 3 0 2
4 4 6 2 0
Output #1
2 2 3 1 2
InputCopy OutputCopy
Input #2
3
0 99990000 99970002
99990000 0 99980000
99970002 99980000 0
Output #2
9999 10000 9998
InputCopy OutputCopy
题目信息
题号
1220B
时间限制
2 s
内存限制
256 MB
标签
数学
数论

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