403867: GYM101343 I Husam and the Broken Present 1

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Husam and the Broken Present 1time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

In his last birthday, Husam received a special present from his best friend, it was a beautiful array a consisting of n positive integers. Husam loved this present so much, so he used it to build another table t such that for each i and j (1  ≤  i, j  ≤  n) tij = ai  ×  aj.

Unfortunately, today Husam was looking for his array a, but he was not able to find it. Husam was very sad, so he asked you to help him. Husam does not remember anything about array a, but he will show you the table t. Can you help Husam to build the array a again?

Input

The First line contains an integer n (1  ≤  n  ≤  100), where n is the size of the array a.

Next n lines follow, each line contains n positive integers (1  ≤  tij  ≤  104), giving the table t.

Output

In a single line print n positive integers a1, a2, ..., an – the array a.

It is guaranteed that there exists a unique answer for each test case. Your answer will consider correct if you can use the printed array a to build the given table t, such that for each i and j (1  ≤  i, j  ≤  n) ti, j = ai  ×  aj.

ExamplesInput
3
9 6 15
6 4 10
15 10 25
Output
3 2 5
Input
5
16 28 8 36 4
28 49 14 63 7
8 14 4 18 2
36 63 18 81 9
4 7 2 9 1
Output
4 7 2 9 1

加入题单

上一题 下一题 算法标签: