{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eOnce upon a time in the galaxy of far, far away...\u003c/p\u003e\u003cp\u003eDarth Wader found out the location of a rebels\u0027 base. Now he is going to destroy the base (and the whole planet that the base is located at), using the Death Star.\u003c/p\u003e\u003cp\u003eWhen the rebels learnt that the Death Star was coming, they decided to use their new secret weapon — space mines. Let\u0027s describe a space mine\u0027s build.\u003c/p\u003e\u003cp\u003eEach space mine is shaped like a ball (we\u0027ll call it the mine body) of a certain radius \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003er\u003c/i\u003e\u003c/span\u003e with the center in the point \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eO\u003c/i\u003e\u003c/span\u003e. Several spikes protrude from the center. Each spike can be represented as a segment, connecting the center of the mine with some point \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eP\u003c/i\u003e\u003c/span\u003e, such that \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/8bd6e4c1560cdf634519382143b0f336?v\u003d1715143073\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e (transporting long-spiked mines is problematic), where \u003cspan class\u003d\"tex-span\"\u003e|\u003ci\u003eOP\u003c/i\u003e|\u003c/span\u003e is the length of the segment connecting \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eO\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eP\u003c/i\u003e\u003c/span\u003e. It is convenient to describe the point \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eP\u003c/i\u003e\u003c/span\u003e by a vector \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ep\u003c/i\u003e\u003c/span\u003e such that \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eP\u003c/i\u003e \u003d \u003ci\u003eO\u003c/i\u003e + \u003ci\u003ep\u003c/i\u003e\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eThe Death Star is shaped like a ball with the radius of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eR\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eR\u003c/i\u003e\u003c/span\u003e exceeds any mine\u0027s radius). It moves at a constant speed along the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ev\u003c/i\u003e\u003c/span\u003e vector at the speed equal to \u003cspan class\u003d\"tex-span\"\u003e|\u003ci\u003ev\u003c/i\u003e|\u003c/span\u003e. At the moment the rebels noticed the Star of Death, it was located in the point \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eA\u003c/i\u003e\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eThe rebels located \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e space mines along the Death Star\u0027s way. You may regard the mines as being idle. The Death Star does not know about the mines\u0027 existence and cannot notice them, which is why it doesn\u0027t change the direction of its movement. As soon as the Star of Death touched the mine (its body or one of the spikes), the mine bursts and destroys the Star of Death. A touching is the situation when there is a point in space which belongs both to the mine and to the Death Star. It is considered that Death Star will not be destroyed if it can move infinitely long time without touching the mines.\u003c/p\u003e\u003cp\u003eHelp the rebels determine whether they will succeed in destroying the Death Star using space mines or not. If they will succeed, determine the moment of time when it will happen (starting from the moment the Death Star was noticed).\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first input data line contains \u003cspan class\u003d\"tex-span\"\u003e7\u003c/span\u003e integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eA\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eA\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ey\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eA\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ez\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ey\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ez\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eR\u003c/i\u003e\u003c/span\u003e. They are the Death Star\u0027s initial position, the direction of its movement, and its radius (\u003cspan class\u003d\"tex-span\"\u003e - 10 ≤ \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ey\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ez\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e|\u003ci\u003ev\u003c/i\u003e| \u0026gt; 0\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e0 \u0026lt; \u003ci\u003eR\u003c/i\u003e ≤ 100\u003c/span\u003e).\u003c/p\u003e\u003cp\u003eThe second line contains an integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e, which is the number of mines (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 100\u003c/span\u003e). Then follow \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e data blocks, the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/span\u003e-th of them describes the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/span\u003e-th mine.\u003c/p\u003e\u003cp\u003eThe first line of each block contains \u003cspan class\u003d\"tex-span\"\u003e5\u003c/span\u003e integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eO\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eix\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eO\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eiy\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eO\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eiz\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003er\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003em\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e, which are the coordinates of the mine centre, the radius of its body and the number of spikes (\u003cspan class\u003d\"tex-span\"\u003e0 \u0026lt; \u003ci\u003er\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e \u0026lt; 100, 0 ≤ \u003ci\u003em\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003c/span\u003e). Then follow \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e lines, describing the spikes of the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/span\u003e-th mine, where the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ej\u003c/i\u003e\u003c/span\u003e-th of them describes the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/span\u003e-th spike and contains \u003cspan class\u003d\"tex-span\"\u003e3\u003c/span\u003e integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ep\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eijx\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ep\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eijy\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ep\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eijz\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e — the coordinates of the vector where the given spike is directed (\u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/b5e503e5347a891ad77ae95d9e538d89?v\u003d1715143073\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e).\u003c/p\u003e\u003cp\u003eThe coordinates of the mines\u0027 centers and the center of the Death Star are integers, their absolute value does not exceed \u003cspan class\u003d\"tex-span\"\u003e10000\u003c/span\u003e. It is guaranteed that \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eR\u003c/i\u003e \u0026gt; \u003ci\u003er\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e for any \u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003ei\u003c/i\u003e ≤ \u003ci\u003en\u003c/i\u003e\u003c/span\u003e. For any mines \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ei\u003c/i\u003e ≠ \u003ci\u003ej\u003c/i\u003e\u003c/span\u003e the following inequality if fulfilled: \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/bf34b29c12a670f0a3bb51713c97b825?v\u003d1715143073\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e. Initially the Death Star and the mines do not have common points.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIf the rebels will succeed in stopping the Death Star using space mines, print the time from the moment the Death Star was noticed to the blast.\u003c/p\u003e\u003cp\u003eIf the Death Star will not touch a mine, print \"-1\" (without quotes).\u003c/p\u003e\u003cp\u003eFor the answer the absolute or relative error of \u003cspan class\u003d\"tex-span\"\u003e10\u003csup class\u003d\"upper-index\"\u003e - 6\u003c/sup\u003e\u003c/span\u003e is acceptable.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e0 0 0 1 0 0 5\n2\n10 8 0 2 2\n0 -3 0\n2 2 0\n20 0 0 4 3\n2 4 0\n-4 3 0\n1 -5 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10.0000000000\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e8 8 4 4 4 2 6\n1\n-2 -2 -1 3 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e-1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e30 30 2 1 2 1 20\n3\n0 0 40 5 1\n1 4 4\n-10 -40 -5 7 0\n100 200 95 8 1\n-10 0 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e74.6757620881\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}