|
|
back to boardCommon BoardHelp please solve the problem of the geometry The territory of the construction of two trees grow. Under the plan works, both the tree to get inside your future flower beds, having the shape of a circle. It is necessary to fence the trees triangular fence so that the fence was contained within a future beds. Trees are represented by circles on the plan, which may overlap with each other or even be nested within one another (the trees can grow together because of local environmental pollution, are inevitable under construction). They lie within the circle corresponding to a bed, but may relate to her. Write a program that on the information you entered on the flowerbed and trees will determine whether it is possible to construct a triangular fence, do not extend beyond the flower beds (with its vertices can lie on the border of flower beds), containing both the tree inside (touching the fence and trees are also permitted). The format of input data Introduce information about the three circles: each is given the center coordinates and radius. All numbers are integers, not exceeding modulo 1000, radius - a natural number. Flower bed corresponds to the first circle, second and third circles lie inside the first and corresponds to the tree. Output format If the trees can not protect the fence, do not go beyond the boundaries of flower beds, display impossible. Otherwise, in the first row record possible, and in the following - the coordinates of the vertices of the desired triangle. If multiple answers, display any. Primerye.in e.out 0 0 1000 0 0 500 0 0 500 possible -468.09507906626652000000 -883.67810709213904000000 -531.24014997680422000000 847.22128340394170000000 999.33522904307131000000 36.45682368819722500000 |
|
|