{"trustable":true,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eSakuyalove has a large world map $M$ and a small world map $m$. Both of the them are in the shape of rectangle. The small map $m$ is compressed from the large map $M$. If the length of $M$ is $a$ and the width of $M$ is $b$, then the length of $m$ is $ka$ and the width of $m$ is $kb$, where $0 \u0026lt; k \u0026lt; 1$. Now Sakuyalove puts the small map $m$ on the large map $M$ such that the small map is completely within the big map (including boundaries). She was surprised to find out that no matter how she places the small map, there always exists \u003cb\u003eexactly one\u003c/b\u003e point $P$ represents the same place in small map and large map (For example, in the following pictures, the location of the pin on both maps represents Tokyo, Japan). Sakuyalove wants to find out this point $P$. Please help her.\u003cbr\u003e\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/b763d333e613e5dc892901074a32ed1b?v\u003d1726225700\"\u003e\u003c/center\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains one integer $T(1\\le T\\le 10^5)$, described the number of test cases.\u003cbr\u003e\u003cbr\u003eEach test case contains eight lines. Each line has two integers $x, y (-10^{3}\\leq x, y\\leq 10 ^ 3)$ separated by one space.\u003cbr\u003e\u003cbr\u003eThe first four lines are the coordinates of the upper left corner, the upper right corner, the lower right corner and the lower left corner of $M$.\u003cbr\u003e\u003cbr\u003eThe last four lines are the coordinates of the upper left corner, the upper right corner, the lower right corner and the lower left corner of $m$.\u003cbr\u003e\u003cbr\u003eIt is guaranteed that $m$ is within $M$, both of the them are in the shape of rectangle, and $m$ is compressed from $M$.\u003cbr\u003e\u003cbr\u003ePlease note that the upper left corner, the upper right corner, the lower right corner and the lower left corner of $m$ and $M$ are \u003cb\u003eone-to-one corresponding\u003c/b\u003e. For example, in the picture of Hint below, the correspondence of points is $A-a$, $B-b$, $C-c$, $D-d$. But $A-c$, $B-d$, $C-a$, $D-b$ is \u003cb\u003enot allowed\u003c/b\u003e. "}},{"title":"Output","value":{"format":"HTML","content":"Your output should contains $T$ lines. Each line contains two real numbers $x, y$ separated by one space, represents the coordinates of the point $P$. Your absolute error should not exceed $10 ^ {-6} $."}},{"title":"Sample","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\r\n0 5\r\n15 5\r\n15 0\r\n0 0\r\n3 2\r\n9 5\r\n10 3\r\n4 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6.000000 2.000000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"In the first example, the picture is like this:\u003cbr\u003e\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/52e5596c1c3c6dd0defcdf5283a2e146?v\u003d1726225700\"\u003e\u003c/center\u003e\u003cbr\u003e"}}]}