time limit per test: 0.25 sec. memory limit per test: 65536 KB
input: standard output: standard
Consider N points on the plane. Each point has its special number. Points arrangement is called "awful" if for any three different points A, B, and C the sum of their special numbers is equal to the area of the triangle ABC. You are given special numbers for all points, but not their coordinates. You have to find some awful points arrangement. It is guarantee, that last special number and previous are equal.
The first line of input contains single integer N (3<=N<=8). Next line contains N positive integers R[i] - special numbers of points (0<R[i]<=100, R[N-1]=R[N]).
On the first line output "YES" (without quotes) if the solution exists, or "NO" (without quotes) if it does not. In case of positive answer output N lines with points coordinates: X[i] and Y[i] with four digits after the decimal point.
Test #1 3 2 3 3
Test #2 4 1 1 1 1
Test #1 YES 1.5000 0.0000 5.5000 0.0000 1.5000 4.0000