{"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\"\u003eXiaoteng has a large area of land for growing crops, and the land can be seen as a rectangle of $n \\times m$. \u003cbr\u003e\u003cbr\u003eBut recently Xiaoteng found that his crops were often stolen by a group of people, so he decided to install some monitors to find all the people and then negotiate with them.\u003cbr\u003e\u003cbr\u003eHowever, Xiao Teng bought bad monitors, each monitor can only monitor the crops inside a rectangle. There are $p$ monitors installed by Xiaoteng, and the rectangle monitored by each monitor is known. \u003cbr\u003e\u003cbr\u003eXiao Teng guess that the thieves would also steal $q$ times of crops. he also guessed the range they were going to steal, which was also a rectangle. Xiao Teng wants to know if his monitors can see all the thieves at a time.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are mutiple test cases.\u003cbr\u003e\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.\u003cbr\u003e\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.\u003cbr\u003e\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.\u003cbr\u003e\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","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 6\r\n3\r\n2 2 4 4\r\n3 3 5 6\r\n5 1 6 2\r\n2\r\n3 2 5 4\r\n1 5 6 5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\r\nNO\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 picture,the red solid rectangles mean the monitor Xiaoteng installed, and the blue dotted rectangles mean the area will be stolen.\u003ccenter\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/e63b15b5b7ca3c9486cd4872e008af52?v\u003d1721547389\"\u003e\u003c/center\u003e"}}]}