{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eTakahashi is playing billiards on a two-dimensional plane. The \u003cvar\u003e\\(x\\)\u003c/var\u003e-axis functions as a wall; when a ball hits the axis, it will bounce off the axis so that the angle of incidence equals the angle of reflection.\u003c/p\u003e\r\n\u003cp\u003eTakahashi\u0027s ball is now at \u003cvar\u003e\\((S_x,S_y)\\)\u003c/var\u003e. When he strikes the ball aiming for some point, it will roll in a straight line towards that point.\u003c/p\u003e\r\n\u003cp\u003eTo make the ball hit the \u003cvar\u003e\\(x\\)\u003c/var\u003e-axis exactly once and then pass \u003cvar\u003e\\((G_x, G_y)\\)\u003c/var\u003e, where along the \u003cvar\u003e\\(x\\)\u003c/var\u003e-axis should he aim for?\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(-10^6 \\leq S_x, G_x \\leq 10^6\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(0 \u0026lt; S_y, G_y \\leq 10^6\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(S_x \\neq G_x\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003eAll values in input are integers.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(S_x\\)\u003c/var\u003e \u003cvar\u003e\\(S_y\\)\u003c/var\u003e \u003cvar\u003e\\(G_x\\)\u003c/var\u003e \u003cvar\u003e\\(G_y\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eLet \u003cvar\u003e\\((x, 0)\\)\u003c/var\u003e be the point Takahashi should aim for. Print \u003cvar\u003e\\(x\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003eYour output will be considered correct when its absolute or relative error from our answer is at most \u003cvar\u003e\\(10^{-6}\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","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\u003e1 1 7 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3.0000000000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eAs shown below, we can make the ball pass \u003cvar\u003e\\((7, 2)\\)\u003c/var\u003e by striking it aiming for \u003cvar\u003e\\((3, 0)\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003e\u003cimg alt\u003d\"Figure\" src\u003d\"CDN_BASE_URL/618a664a3ac94ef7de019ff54625f49e?v\u003d1725917568\"\u003e\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","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\u003e1 1 3 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.6666666667\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003e\u003cimg alt\u003d\"Figure\" src\u003d\"CDN_BASE_URL/1626a0c1a78de5af979927661b8fb826?v\u003d1725917568\"\u003e\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","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\u003e-9 99 -999 9999\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e-18.7058823529\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eThe output will be considered correct when its absolute or relative error from our answer is at most \u003cvar\u003e\\(10^{-6}\\)\u003c/var\u003e.\u003c/p\u003e\u003c/section\u003e\r\n"}}]}