I - Build me a fence

Time limit: 1 s
Memory limit: 256 MiB
Languages: C, C++, Java, Python, ... (details)

Given a list with $n$ positive integers ($a_1, a_2, \cdots, a_n$), find $n$ points ($p_1, p_2, \cdots, p_n$) that form a closed polygon such that:
  •  Distance between points $p_i$ and $p_{i+1}$ is equal to $a_i$ if $1 \le i < n$.
  •  Distance between points $p_n$ and $p_1$ is equal to $a_n$.
  •  Polygon has positive area (ie, it is a non degenerate polygon).
  •  Non consecutive sides should not intersect.

Input

A line with one integer $n$ $(3 \le n \le 100)$, number of sides of the polygon. Then a line with $n$ positive integers $(1 \le a_i \le 100)$.

Output

If there is no valid polygon satisfying the constraints print $\texttt{"No"}$ without quotes. Otherwise print $\texttt{"Si"}$  without quotes, and next print $n$ lines with vertex coordinates  $x, y$ $(-10^6 \le x, y \le 10^6)$ in consecutive order. Any polygon that satisfies problem constraints will be considered valid. Real distance between printed vertex and expected distance should be less than $10^{-6}$.

Sample test(s)

Input
4 1 1 1 1
Output
Si 0 0 0 1 1 1 1 0
Input
4 1 1 3 1
Output
No