{"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":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Xiaoteng has a large area of land for growing crops, and the land can be seen as a rectangle of $n \\times m$. "}},{"title":"Input","value":{"format":"HTML","content":"There are mutiple test cases.\n\u003cbr\u003e\n\u003cbr\u003eEach case starts with a line containing two integers $n,m (1 \\leq n,1 \\leq m , n \\times m \\leq 10^7)$ which represent the area of the land.\n\u003cbr\u003e\n\u003cbr\u003eAnd the secend line contain a integer $p(1 \\leq p \\leq 10^6)$ which represent the number of the monitor Xiaoteng has installed. This is followed by p lines each describing a rectangle. Each of these lines contains four intergers $x_1,y_1,x_2~and~y_2(1\\leq x_1 \\leq x_2 \\leq n,1\\leq y_1 \\leq y_2 \\leq m)$ ,meaning the lower left corner and upper right corner of the rectangle.\n\u003cbr\u003e\n\u003cbr\u003eNext line contain a integer $q(1 \\leq q\\leq 10^6)$ which represent the number of times that thieves will steal the crops.This is followed by q lines each describing a rectangle. Each of these lines contains four intergers $x_1,y_1,x_2~and~y_2(1\\leq x_1 \\leq x_2 \\leq n,1\\leq y_1 \\leq y_2 \\leq m)$,meaning the lower left corner and upper right corner of the rectangle."}},{"title":"Output","value":{"format":"HTML","content":"For each case you should print $q$ lines.\n\u003cbr\u003e\n\u003cbr\u003eEach line containing \u003cb\u003eYES\u003c/b\u003e or \u003cb\u003eNO\u003c/b\u003e mean the all thieves whether can be seen."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e6 6\n3\n2 2 4 4\n3 3 5 6\n5 1 6 2\n2\n3 2 5 4\n1 5 6 5\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eYES\nNO\n\n\n \u003ci style\u003d\"font-size:1px\"\u003e \u003c/i\u003e\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cpre\u003eIn the picture,the red solid rectangles mean the monitor Xiaoteng installed, and the blue dotted rectangles mean the area will be stolen.\n \u003ccenter\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/e63b15b5b7ca3c9486cd4872e008af52?v\u003d1627673243\"\u003e\n \u003c/center\u003e\n \u003c/pre\u003e"}}]}