{"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\u003eAlice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! \u003c/p\u003e\u003cp\u003eInitially, Alice\u0027s cat is located in a cell $$$(x,y)$$$ of an infinite grid. According to Alice\u0027s theory, cat needs to move: \u003c/p\u003e\u003cul\u003e \u003cli\u003e exactly $$$a$$$ steps left: from $$$(u,v)$$$ to $$$(u-1,v)$$$; \u003c/li\u003e\u003cli\u003e exactly $$$b$$$ steps right: from $$$(u,v)$$$ to $$$(u+1,v)$$$; \u003c/li\u003e\u003cli\u003e exactly $$$c$$$ steps down: from $$$(u,v)$$$ to $$$(u,v-1)$$$; \u003c/li\u003e\u003cli\u003e exactly $$$d$$$ steps up: from $$$(u,v)$$$ to $$$(u,v+1)$$$. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eNote that the moves can be performed in an \u003cspan class\u003d\"tex-font-style-bf\"\u003earbitrary order\u003c/span\u003e. For example, if the cat has to move $$$1$$$ step left, $$$3$$$ steps right and $$$2$$$ steps down, then the walk right, down, left, right, right, down is valid.\u003c/p\u003e\u003cp\u003eAlice, however, is worrying that her cat might get lost if it moves far away from her. So she hopes that her cat is \u003cspan class\u003d\"tex-font-style-bf\"\u003ealways\u003c/span\u003e in the area $$$[x_1,x_2]\\times [y_1,y_2]$$$, i.e. for every cat\u0027s position $$$(u,v)$$$ of a walk $$$x_1 \\le u \\le x_2$$$ and $$$y_1 \\le v \\le y_2$$$ holds.\u003c/p\u003e\u003cp\u003eAlso, note that the cat can visit the same cell multiple times.\u003c/p\u003e\u003cp\u003eCan you help Alice find out if there exists a walk satisfying her wishes?\u003c/p\u003e\u003cp\u003eFormally, the walk should contain exactly $$$a+b+c+d$$$ unit moves ($$$a$$$ to the left, $$$b$$$ to the right, $$$c$$$ to the down, $$$d$$$ to the up). Alice can do the moves in \u003cspan class\u003d\"tex-font-style-bf\"\u003eany\u003c/span\u003e order. Her current position $$$(u, v)$$$ should \u003cspan class\u003d\"tex-font-style-bf\"\u003ealways\u003c/span\u003e satisfy the constraints: $$$x_1 \\le u \\le x_2$$$, $$$y_1 \\le v \\le y_2$$$. The staring point is $$$(x, y)$$$.\u003c/p\u003e\u003cp\u003eYou are required to answer $$$t$$$ test cases \u003cspan class\u003d\"tex-font-style-bf\"\u003eindependently\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer $$$t$$$ ($$$1 \\le t \\le 10^3$$$) — the number of testcases. \u003c/p\u003e\u003cp\u003eThe first line of each test case contains four integers $$$a$$$, $$$b$$$, $$$c$$$, $$$d$$$ ($$$0 \\le a,b,c,d \\le 10^8$$$, $$$a+b+c+d \\ge 1$$$).\u003c/p\u003e\u003cp\u003eThe second line of the test case contains six integers $$$x$$$, $$$y$$$, $$$x_1$$$, $$$y_1$$$, $$$x_2$$$, $$$y_2$$$ ($$$-10^8 \\le x_1\\le x \\le x_2 \\le 10^8$$$, $$$-10^8 \\le y_1 \\le y \\le y_2 \\le 10^8$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\" in a separate line, if there exists a walk satisfying her wishes. Otherwise, output \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\" in a separate line. \u003c/p\u003e\u003cp\u003eYou can print each letter in any case (upper or lower).\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\u003e6\n3 2 2 2\n0 0 -2 -2 2 2\n3 1 4 1\n0 0 -1 -1 1 1\n1 1 1 1\n1 1 1 1 1 1\n0 0 0 1\n0 0 0 0 0 1\n5 1 1 1\n0 0 -100 -100 0 100\n1 1 5 1\n0 0 -100 -100 100 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\nNo\nNo\nYes\nYes\nYes\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case, one valid exercising walk is $$$$$$(0,0)\\rightarrow (-1,0) \\rightarrow (-2,0)\\rightarrow (-2,1) \\rightarrow (-2,2)\\rightarrow (-1,2)\\rightarrow(0,2)\\rightarrow (0,1)\\rightarrow (0,0) \\rightarrow (-1,0)$$$$$$\u003c/p\u003e"}}]}