Problem8567--CGL_7_G : Common Tangent

8567: CGL_7_G : Common Tangent

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB  Special Judge

Description

Find common tangent lines of two circles $c_1$ and $c_2$.

Input

Center coordinates $(c_{ix}, c_{iy})$ and radii $c_{ir}$ of two circles $c_1$ are $c_2$ are given in the following format.
$c_{1x}\ c_{1y}\ c_{1r}$
$c_{2x}\ c_{2y}\ c_{2r}$
All input values are given in integers.

Output

Print coordinates of the tangent points on circle $c_1$ based on the following rules.
  • Print the coordinate with smaller $x$ first. In case of a tie, print the coordinate with smaller $y$ first.
The output values should be in a decimal fraction with an error less than 0.00001.

Constraints

$−1,000≤c_{1x},c_{1y},c_{2x},c_{2y}≤1,000$
$1≤c_{1r},c_{2r}≤1,000$
$c_1$ and $c_2$ are different

Sample 1 Input

1 1 1
6 2 2

Sample 1 Output

0.6153846154 1.9230769231
1.0000000000 0.0000000000
1.4183420913 1.9082895434
1.7355040625 0.3224796874

Sample 2 Input

1 2 1
4 2 2

Sample 2 Output

0.6666666667 1.0571909584
0.6666666667 2.9428090416
2.0000000000 2.0000000000

Sample 3 Input

1 2 1
3 2 2

Sample 3 Output

0.5000000000 1.1339745962
0.5000000000 2.8660254038

0 0 1
1 0 2

-1.0000000000 0.0000000000

Sample 4 Input

0 0 1
0 0 2

HINT

相同题目:CGL_7_G

Source/Category