Problem C. Chain of Circles

Author:A. Baranov   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

Given an ordered set of two-dimensional points specified by their coordinates (xi, yi),
you must construct circles between each pair of consecutive points with indices i and i + 1 such that:

The task is to output the coordinates of the centers of such circles.

Input format

The first line contains the number of points, n.
The next line contains 2 × n floating-point numbers: the coordinates (xi, yi) of the points.

Output format

Output the coordinates of the circle centers with a precision of 10 decimal places.

Constraints

It is guaranteed that a solution exists.
The maximum radius of any circle does not exceed 100.

 − 10 ≤ (xi, yi) ≤ 10, |xi + 1 − xi| + |yi + 1 − yi| > 0,
2 ≤ n ≤ 500.

Sample tests

No. Standard input Standard output
1
4
-1.00000 -2.00000
 1.50000 -1.50000
 3.00000  1.00000
 1.00000  4.00000
 0.2758620685 -1.8793103423
 3.3684210571 -0.9210526343
 2.6315789438  2.9210526292
2
3
-1.50000  0.50000
-2.50000  3.50000
 3.50000 -1.50000
-1.0714285714  2.3095238095
 0.5000000000  1.0000000000

0.107s 0.010s 13