Denormalization

아직 제출이 없습니다시간 제한5초메모리 제한1024 MB

문제

Dr. Brodnik prepared a list A=\[a_1,a_2,,a_N]A = \[a\_1, a\_2, \ldots, a\_N] that contained NN integers. No one knows what exactly these numbers represented, but it is well known that:

  • 1a_i10,0001 \leq a\_i \leq 10\\,000 for all 1iN1 \leq i \leq N and
  • their greatest common divisor was 11.

Dr. Hočevar decided to do his colleague a favor and normalized the list, as he thought that it represents a vector in the nn-dimensional real vector space. Namely, he calculated the number d=_i=1Na_i2=a_12+a_22++a_N2d = \sqrt{\sum\_{i=1}^{N}a\_i^2} = \sqrt{a\_1^2 + a\_2^2 + \cdots + a\_N^2} and replaced Dr. Brodnik's list by \[a_1/d,a_2/d,,a_N/d]\[a\_1 / d, a\_2 / d, \ldots, a\_N / d]. The numbers in this normalized list were also rounded to 12 decimal places for storage. We will refer to the elements of the stored normalized list as X=\[x_1,x_2,,x_N]X = \[x\_1, x\_2, \ldots, x\_N]. After some time, he realized that it was a mistake and he now wishes to recover the original list AA. Of course, no backup of the original has been made. Since Dr. Hočevar is too busy at the moment doing more important tasks, your help will be much appreciated.

As some data was lost due to rounding, he will be happy with any reconstructed list R=\[r_1,r_2,,r_N]R = \[r\_1, r\_2, \ldots, r\_N], such that after normalization it would differ from XX by at most 10610^{-6} in each corresponding element.

입력

The first line of the input contains an integer NN, i.e. the length of the list XX. The ii-th of the following NN lines contains a floating-point number x_ix\_i with exactly 12 decimal places. It is guaranteed that the input is valid, i.e. it was really obtained in the described manner from a list of integers with the properties described above.

출력

The output should contain NN lines containing the reconstructed integers r_1,r_2,,r_Nr\_1, r\_2, \ldots, r\_N in this order. You can output any acceptable solution as described above.

  • 1r_i10,0001 \leq r\_i \leq 10\\,000 for all 1iN1 \leq i \leq N
  • gcd(r_1,,r_N)=1\gcd(r\_1, \ldots, r\_N) = 1

제한

  • 2N10,0002 \leq N \leq 10\\,000
  • 0<x_i<10 < x\_i < 1 for all 1iN1 \leq i \leq N