{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"MD","content":"## 题目描述\n\n你有 $N$ 块巧克力,第 $i$ 块的尺寸是 $A_i$ 长 $B_i$ 宽,然后还有 $M$ 个盒子,第 $j$ 个盒子的尺寸是 $C_j$ 长 $D_j$ 宽。\n\n有没有可能把这 $N$ 块巧克力都放进盒子里,并且符合以下要求:\n\n* 一个盒子至多放一块巧克力。\n* 巧克力不能旋转,即如果把第 $i$ 块巧克力放入第 $j$ 个盒子时,必须满足 $A_i \\le C_j$ 且 $B_i \\le D_j$。\n\n## 数据范围\n\n* $1 \\le N \\le M \\le 2 \\times 10^5$\n* $1 \\le A_i, B_i, C_i, D_i \\le 10^9$\n* 所有输入均为整数。\n\n\u003csection\u003e\n \u003cp\u003eTakahashi has \u003cvar\u003e\\(N\\)\u003c/var\u003e pieces of chocolate. The \u003cvar\u003e\\(i\\)\u003c/var\u003e-th piece has a rectangular shape with a width of \u003cvar\u003e\\(A_i\\)\u003c/var\u003e centimeters and a length of \u003cvar\u003e\\(B_i\\)\u003c/var\u003e centimeters.\u003cbr\u003e\n He also has \u003cvar\u003e\\(M\\)\u003c/var\u003e boxes. The \u003cvar\u003e\\(i\\)\u003c/var\u003e-th box has a rectangular shape with a width of \u003cvar\u003e\\(C_i\\)\u003c/var\u003e centimeters and a length of \u003cvar\u003e\\(D_i\\)\u003c/var\u003e centimeters.\u003c/p\u003e\n \u003cp\u003eDetermine whether it is possible to put the \u003cvar\u003e\\(N\\)\u003c/var\u003e pieces of chocolate in the boxes under the conditions below.\u003c/p\u003e\n \u003cul\u003e\n \u003cli\u003eA box can contain at most one piece of chocolate.\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(A_i \\leq C_j\\)\u003c/var\u003e and \u003cvar\u003e\\(B_i \\leq D_j\\)\u003c/var\u003e must hold when putting the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th piece of chocolate in the \u003cvar\u003e\\(j\\)\u003c/var\u003e-th box (they cannot be rotated).\u003c/li\u003e\n \u003c/ul\u003e\n\u003c/section\u003e"}},{"title":"Constraints","value":{"format":"MD","content":"\u003csection\u003e\n \u003cul\u003e\n \u003cli\u003e\u003cvar\u003e\\(1 \\leq N \\leq M \\leq 2\\times 10^5\\)\u003c/var\u003e\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(1 \\leq A_i,B_i,C_i,D_i \\leq 10^9\\)\u003c/var\u003e\u003c/li\u003e\n \u003cli\u003eAll values in input are integers.\u003c/li\u003e\n \u003c/ul\u003e\n\u003c/section\u003e"}},{"title":"Input","value":{"format":"MD","content":"\u003csection\u003e\n \u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\n \u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e \u003cvar\u003e\\(M\\)\u003c/var\u003e\n\u003cvar\u003e\\(A_1\\)\u003c/var\u003e \u003cvar\u003e\\(\\ldots\\)\u003c/var\u003e \u003cvar\u003e\\(A_N\\)\u003c/var\u003e\n\u003cvar\u003e\\(B_1\\)\u003c/var\u003e \u003cvar\u003e\\(\\ldots\\)\u003c/var\u003e \u003cvar\u003e\\(B_N\\)\u003c/var\u003e\n\u003cvar\u003e\\(C_1\\)\u003c/var\u003e \u003cvar\u003e\\(\\ldots\\)\u003c/var\u003e \u003cvar\u003e\\(C_M\\)\u003c/var\u003e\n\u003cvar\u003e\\(D_1\\)\u003c/var\u003e \u003cvar\u003e\\(\\ldots\\)\u003c/var\u003e \u003cvar\u003e\\(D_M\\)\u003c/var\u003e\n\u003c/pre\u003e\n\u003c/section\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003csection\u003e\n \u003cp\u003eIf it is possible to put the \u003cvar\u003e\\(N\\)\u003c/var\u003e pieces of chocolate in the boxes, print \u003ccode\u003eYes\u003c/code\u003e; otherwise, print \u003ccode\u003eNo\u003c/code\u003e.\u003c/p\u003e\n\u003c/section\u003e"}},{"title":"Sample 1","value":{"format":"MD","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\u003e2 3\n2 4\n3 2\n8 1 5\n2 10 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n \u003cp\u003eWe can put the first piece of chocolate in the third box and the second piece in the first box.\u003c/p\u003e\n\u003c/section\u003e"}},{"title":"Sample 2","value":{"format":"MD","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\u003e2 2\n1 1\n2 2\n100 1\n100 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n \u003cp\u003eA box can contain at most one piece of chocolate.\u003c/p\u003e\n\u003c/section\u003e"}},{"title":"Sample 3","value":{"format":"MD","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 1\n10\n100\n100\n10\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n\u003c/section\u003e"}},{"title":"Sample 4","value":{"format":"MD","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 1\n10\n100\n10\n100\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n\u003c/section\u003e"}}]}