Points of Intersection of Circles
Given two circles: one centered at (x[1]
, y[1]
) with radius R[1]
, and the other centered at (x[2]
, y[2]
) with radius R[2]
. It is guaranteed that these circles are not completely identical. Your task is to determine the points where these circles intersect. Note that if the circles are tangent to each other, this is considered an intersection.
Input Data
You will receive six integers: x[1]
y[1]
R[1]
x[2]
y[2]
R[2]
, all on a single line separated by spaces. Each number will not exceed an absolute value of 10000, and the radii are positive.
Output Data
First, output a single non-negative integer K on the first line, representing the number of intersection points between the circles. Then, for each intersection point, output a line containing the x- and y-coordinates. The coordinates should be accurate to within an absolute or relative error of no more than 10^(-8)
.