{"trustable":false,"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\"\u003e\n 小蔡有一个大地图 $M$ 和一个小地图 $m$. 它们是相似的矩形,小地图 $m$ 是大地图 $M$ 的缩小.\u003cbr\u003e意味着,如果 $M$ 有一个边 $a$ 和 $b$, 那么小地图 $m$ 就有边 $ka$ 和 $kb$($0 \u0026lt; k \u0026lt; 1$). 现在小蔡将小地图 $m$ 放在大地图 $M$ 上,并且保证小地图完全被大地图包含(包括边界).他惊奇地发现不管他怎么调整两者位置, \u003cb\u003e总存在且仅存在\u003c/b\u003e 点 $P$ 代表大小地图相同的位置 (举个例子,下图大小地图相同的点为日本东京). 现在小蔡想找到这个点,帮帮他.\u003cbr\u003e\u003cbr\u003e\n \u003ccenter\u003e\n \u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/b763d333e613e5dc892901074a32ed1b?v\u003d1660888248\"\u003e\n \u003c/center\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"一共有 $T(1\\le T\\le 10^5)$组数据.\u003cbr\u003e\u003cbr\u003e每组数据有八行. 每行有 $x, y (-10^{3}\\leq x, y\\leq 10 ^ 3)$ 代表一个点的二维坐标.\u003cbr\u003e\u003cbr\u003e八行依次给出大地图的左上角,右上角,右下角,左下角,小地图的左上角,右上角,右下角,左下角\u003cbr\u003e\u003cbr\u003e保证小地图是大地图的缩小.\u003cbr\u003e\u003cbr\u003e请注意,输入中大小地图的左上角是已经对应的"}},{"title":"Output","value":{"format":"HTML","content":"你需要输出T行(x,y),代表P点的坐标. 误差允许在 $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\u003e\u003cpre\u003e1\n0 5\n15 5\n15 0\n0 0\n3 2\n9 5\n10 3\n4 0\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e6.000000 2.000000\n\u003c/pre\u003e\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\n\u003ccenter\u003e\n \u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/52e5596c1c3c6dd0defcdf5283a2e146?v\u003d1660888248\"\u003e\n\u003c/center\u003e\u003cbr\u003e"}}]}