{"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":"题目描述","value":{"format":"MD","content":"毕业啦,贴心的导员K想给所有人准备一个礼物,他购买了 $n$ 个礼物,每个礼物长为 $a_i$ ,宽为 $b_i$ ,同时他还买了 $m$ 个礼物盒,每个礼物盒长为 $c_i$ ,宽为 $d_i$ ,一个礼物盒最多只能放下一个礼物,且对于任意的礼物 $i$ 和礼物盒 $j$ ,只有在 $a_i\\leq c_j$ 并且 $b_i\\leq d_j$ 时,礼物 $i$ 才能放进礼物盒 $j$ (为了保持礼物的完整性,礼物不能旋转放入)\n\n现在K想知道,能否将这 $n$ 个礼物都放到礼物盒中?"}},{"title":"输入格式","value":{"format":"MD","content":"第一行两个整数 $n$ , $m$\n\n第二行 $n$ 个整数,分别表示 $a_1,\\dots , a_n$\n\n第三行 $n$ 个整数,分别表示 $b_1,\\dots , b_n$\n\n第四行 $m$ 个整数,分别表示 $c_1,\\dots , c_m$\n\n第五行 $m$ 个整数,分别表示 $d_1,\\dots , d_m$\n\n$1\\leq n \\leq m \\leq 2\\times 10^5$\n\n$1\\leq a_i,b_i,c_i,d_i\\leq 10^9$\n\n保证所有的输入是整数"}},{"title":"输出格式","value":{"format":"MD","content":"如果能将这 $n$ 个礼物都放到礼物盒中,输出 Yes,否则输出 No"}},{"title":"样例输入1","value":{"format":"MD","content":"2 3\n3 5\n4 3\n2 9 6\n11 3 6"}},{"title":"样例输出1","value":{"format":"MD","content":"Yes"}},{"title":"样例输入2","value":{"format":"MD","content":"2 2\n1 1\n2 2\n100 1\n100 1"}},{"title":"样例输出2","value":{"format":"MD","content":"No"}}]}