2437: Paper

内存限制:128 MB 时间限制:10.000 S
评测方式:特殊裁判 命题人:
提交:0 解决:0

题目描述

Jitui and Goddess are taking the Train 38 to see Protein Tiger.

Goddess gives Jitui a paper. The paper is a convex polygon. Goddess wants to cut off some circles from the paper. These circles may overlap but will not exceed the paper.

The paper may rotate around the select vertex, when Jitui selects a vertex from the paper and hang it on the wall. Given the original coordinates, now Jitui wants to know the coordinates of every vertex when the paper is stable.

输入

There are several test cases, please process till EOF.

The first line contains n, m, p (1 ≤ n,m ≤ 2000, 1 ≤ p ≤ n) means number of convex polygon vertex, number of circles and the number of vertex Jitui selects.
Next n lines, each line contains two integers x, y (|x|, |y| ≤ 10000) means the coordinates of every vertex of the paper.
Next m lines, each line contains three integers x, y, r describes a circle radius is r and center is (x, y).

The convex polygon will be given in counter-clockwise.

输出

For each test contains n lines. Describes the coordinates of the paper which is stable. The order should be the same as origin convex polygon.
Answer will be considered as correct if their absolute error is less than 10-5.

样例输入 复制

4 1 3
0 0
2 0
2 2
0 2
1 1 1

样例输出 复制

2.000000 -0.828427
3.414214 0.585786
2.000000 2.000000
0.585786 0.585786