{"trustable":false,"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003e敏敏学姐已经一学期没上体育课了,她现在必须想办法通过这门课。正规的方法显然是不行了,敏敏学姐开始想各种歪门邪道。她不知从哪里搞来了一张当地医院的空白证明,于是她模仿医生的笔迹填满了整张证明(请勿模仿),现在问题来了,敏敏学姐突然发现医生的签名很难模仿。\u003c/p\u003e\n\u003cp\u003e我们将签名区域简化为 n×m 个方格,敏敏学姐有一支能够填满 3×3 (除去中心)区域的笔 ,见下图(其中x为涂色区域,. 为空白区域)\u003c/p\u003e\n\u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003exxx\u003cbr\u003ex.x\u003cbr\u003exxx\u003cbr\u003e\u003c/pre\u003e \n\u003c/center\u003e\n\u003cp\u003e敏敏学姐想让你帮她确定医生的签名是否可以伪造。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行包含两个正整数 n 和 m (3 ≤ n, m ≤ 1000)。\u003c/p\u003e\n\u003cp\u003e接下来的n行,每行有m个字符。其中 \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e.\u003c/span\u003e\u0027代表空白区域,\u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e#\u003c/span\u003e\u0027 代表涂色区域。\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e如果敏敏学姐可以伪造签名,输出 \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\"。否则就输出 \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\"。\u003c/p\u003e\n\u003cp\u003e大小写都可以。\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3 3\u003cbr\u003e###\u003cbr\u003e#.#\u003cbr\u003e###\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eYES\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3 3\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eNO\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e4 3\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eYES\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e5 7\u003cbr\u003e.......\u003cbr\u003e.#####.\u003cbr\u003e.#.#.#.\u003cbr\u003e.#####.\u003cbr\u003e.......\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eYES\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e第一个样例中,敏敏学姐可以以(2, 2)为中心涂色。\u003c/p\u003e\n\u003cp\u003e第二个样例中,无论敏敏学姐怎么涂色都不行。\u003c/p\u003e\n\u003cp\u003e第三个样例中,敏敏学姐可以以 (2, 2) 和 (3, 2) 为中心涂色: \u003c/p\u003e\n\u003col\u003e \n \u003cli\u003e 一开始为空白纸:\n \u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003e...\u003cbr\u003e...\u003cbr\u003e...\u003cbr\u003e...\u003cbr\u003e\u003c/pre\u003e \n \u003c/center\u003e\u003c/li\u003e\n \u003cli\u003e 以 (2, 2) 为中心涂色\n \u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003e###\u003cbr\u003e#.#\u003cbr\u003e###\u003cbr\u003e...\u003cbr\u003e\u003c/pre\u003e \n \u003c/center\u003e\u003c/li\u003e\n \u003cli\u003e 以 (3, 2) 为中心涂色\n \u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e###\u003cbr\u003e\u003c/pre\u003e \n \u003c/center\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e第四个样例中,敏敏学姐可以以 (3, 3) 和 (3, 5) 为中心涂色。\u003c/p\u003e"}}]}