In a forgotten realm, a group of adventurers stumbles upon a set of mysterious scrolls hidden deep within an ancient library. These scrolls hold the secrets of a powerful numerical array that controls the magic of the realm. However, the scrolls have been damaged over time, and only fragments remain. Specifically, the adventurers discover a sequence of numbers representing the products of adjacent elements of an unknown array $$$A$$$.
The original array $$$A$$$ consists of $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ where $$$1\le a_i \le 100$$$ for $$$1\le i\le n$$$. The only information remaining on the scrolls is a sequence of $$$n-1$$$ integers $$$b_1, b_2, \ldots, b_{n-1}$$$, which are unordered products of adjacent elements from $$$A$$$. In other words: $$$$$$ \{b_1, b_2, \ldots, b_{n-1}\} = \{a_1 \times a_2, a_2 \times a_3, \ldots, a_{n-1} \times a_n\} $$$$$$
Your task is to help the adventurers reconstruct one possible original array $$$A$$$. If there are multiple valid arrays $$$A$$$ that could result in the same sequence $$$b$$$, you may output any of them.
The first line contains a single integer $$$n$$$, representing the length of the array $$$A$$$. The second line contains $$$n-1$$$ space-separated integers $$$b_1, b_2, \ldots, b_{n-1}$$$, representing the products of adjacent elements in the array $$$A$$$.
Technical Specification
If there is no such array $$$A$$$, then print No on a line. Otherwise, print Yes on the first line. Then, output $$$n$$$ space-separated integers $$$a_1,a_2,\dots,a_n$$$ on the second line, where $$$\{b_1, b_2, \ldots, b_{n-1}\}=\{a_1\times a_2, a_2\times a_3, \ldots, a_{n-1}\times a_n\}$$$.
8 42 32 84 54 48 40 16
Yes 5 8 4 21 2 8 6 9
6 45 4 5 4 3
Yes 3 1 4 1 5 9
2 3246
No
| Name |
|---|


