{"raw_statement":[{"iden":"statement","content":"There was nothing left in my life except the way forward. I rode a horse to the city where Dragon had to hide. My mind became free of urgent problems and I started to remember the past unintentionally. The past is a puzzle, like a broken mirror. As you piece it together, you cut yourself, your image keeps shifting. Again and again pictures of my previous life, gone forever, were floating before my eyes.\n\nI was a glorious knight in the service of the King. With my wife and two daughters I lived in a country house. We had a garden of a circular shape, with the radius r and with the center at the origin. Inside it, at the points with coordinates  and , two tall trees grew. Daughters loved those trees so I couldn't just cut them. The border of the garden was a green hedge. Not long before that day we bought a sheep, intending to start cattle breeding. I decided to tie the sheep to a pillar with an inextensible rope so that it couldn't gnaw the trees or the green hedge. Also I planned to give the sheep as big area as possible. Really poor idea.\n\nI was working under the cover, trying to find a source of Blue Tea. I almost found Dragon and his laboratory when I was disclosed. Ordered by Dragon, his bandits killed my wife and daughters, while corrupted knights fabricated evidences against me, so that they both became my enemies. Turn around, walk away, blow the kingdom. That would have been the smart thing to do. I guess I wasn't that smart. I didn't even manage to find out where to place the damned pillar for a sheep.\n\nThe first line contains a single integer r (2 ≤ r ≤ 109) — the radius of the garden.\n\nThe second line contains two integers separated by a space: x1 and y1 (x12 + y12 < r2) — the coordinates of the first tree. The third line in the same way contains two integers x2 and y2 (x22 + y22 < r2) — the coordinates of the second tree. It is guaranteed that points  and  are different.\n\nOutput a single number rs in the first line — the length of the rope for a sheep. In the second line output two numbers separated by a space — the coordinates of the pillar for a sheep. The area that sheep is able to access has to be entirely inside the circle with the center at the origin and the radius . The distance between the pillar and each of the trees has to be at least . The radius of the area available for a sheep can be less than the radius found by the jury's program by at most 10 - 3.\n\n"},{"iden":"input","content":"The first line contains a single integer r (2 ≤ r ≤ 109) — the radius of the garden.The second line contains two integers separated by a space: x1 and y1 (x12 + y12 < r2) — the coordinates of the first tree. The third line in the same way contains two integers x2 and y2 (x22 + y22 < r2) — the coordinates of the second tree. It is guaranteed that points  and  are different."},{"iden":"output","content":"Output a single number rs in the first line — the length of the rope for a sheep. In the second line output two numbers separated by a space — the coordinates of the pillar for a sheep. The area that sheep is able to access has to be entirely inside the circle with the center at the origin and the radius . The distance between the pillar and each of the trees has to be at least . The radius of the area available for a sheep can be less than the radius found by the jury's program by at most 10 - 3."},{"iden":"examples","content":"Input31 12 1Output2.207106781186547-0.560660172 -0.560660172Input32 11 2Output2.6094757082487297-0.276142375 -0.276142375"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of guests, with $ 2 < n < 100 $.  \nLet $ D = (d_1, d_2, \\dots, d_n) $ be the clockwise seating order of guests at the dinner table.  \nLet $ E = (e_1, e_2, \\dots, e_n) $ be the clockwise seating order of guests at the dessert table.  \n\nDefine a bijection $ \\sigma: \\{1, \\dots, n\\} \\to \\{1, \\dots, n\\} $ such that guest $ d_i $ is assigned to seat $ e_{\\sigma(i)} $.\n\n**Constraints**  \n1. All $ d_i $ and $ e_j $ are distinct guest names.  \n2. Paths are non-intersecting with tables.  \n3. Each pair of paths intersects in at most one point.  \n4. No three paths intersect at a single point.  \n\n**Objective**  \nMinimize the total number of intersections among the $ n $ paths, where an intersection occurs between two paths $ (d_i \\to e_{\\sigma(i)}) $ and $ (d_j \\to e_{\\sigma(j)}) $ if and only if the relative cyclic orders of $ d_i, d_j $ and $ e_{\\sigma(i)}, e_{\\sigma(j)} $ are inverted.  \n\nThat is, the minimum number of intersections is equal to the number of inversions in the permutation $ \\sigma $, where:  \n$$\n\\text{Inversions}(\\sigma) = \\left| \\left\\{ (i,j) \\mid i < j \\text{ and } \\sigma(i) > \\sigma(j) \\right\\} \\right|\n$$\n\nThus, the objective is to compute:  \n$$\n\\min_{\\sigma} \\text{Inversions}(\\sigma)\n$$  \nwhere $ \\sigma $ is the permutation mapping dinner positions to dessert positions according to guest identities.","simple_statement":"Given two circular seating orders of n guests (for dinner and dessert tables), find the minimum number of crossings between paths connecting each guest from their dinner seat to their dessert seat, when paths are drawn as curves without crossing tables.","has_page_source":false}