No tags yet

No tag edit access

time limit per test: 0.25 sec.

memory limit per test: 65536 KB

memory limit per test: 65536 KB

input: standard

output: 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.

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.

Input

Test #1

3

2 3 3

Test #2

4

1 1 1 1

3

2 3 3

Test #2

4

1 1 1 1

Output

Test #1

YES

1.5000 0.0000

5.5000 0.0000

1.5000 4.0000

Test #2

YES

0.0000 0.0000

0.0000 2.4495

2.4495 0.0000

2.4495 2.4495

YES

1.5000 0.0000

5.5000 0.0000

1.5000 4.0000

Test #2

YES

0.0000 0.0000

0.0000 2.4495

2.4495 0.0000

2.4495 2.4495

Author: | Alexey Preobrajensky |

Resource: | Petrozavodsk Summer Training Sessions 2004 |

Date: | August 25, 2004 |

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/23/2019 21:13:52 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|