solutions: ["(H, W) = map(int, input().split())\nS = ['.' * (W + 2)]\nfor i in range(H):\n\tS.append('.' + input() + '.')\nS.append('.' * (W + 2))\nprint('Yes' if all((S[i][j] == '.' or (S[i + 1][j] == '#' or S[i - 1][j] == '#' or S[i][j + 1] == '#' or (S[i][j - 1] == '#')) for i in range(1, H + 1) for j in range(1, W))) else 'No')\n", "(h, w) = list(map(int, input().split()))\ndx = [0, 1, 0, -1]\ndy = [1, 0, -1, 0]\nA = [list(input()) for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif A[i][j] == '#':\n\t\t\tfor (q, e) in zip(dx, dy):\n\t\t\t\tif 0 <= i + q < h and 0 <= j + e < w:\n\t\t\t\t\tif A[i + q][e + j] == '#':\n\t\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [input() for _ in range(h)]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i - 1][j] + s[i + 1][j] + s[i][j - 1] + s[i][j + 1] == '....':\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "from itertools import product\n(H, W) = list(map(int, input().split()))\ns = [input() for _ in range(H)]\nfor (i, j) in product(list(range(H)), list(range(W))):\n\tif s[i][j] == '.':\n\t\tcontinue\n\tis_ok = False\n\tfor (di, dj) in ((1, 0), (-1, 0), (0, 1), (0, -1)):\n\t\t(ni, nj) = (i + di, j + dj)\n\t\tif not (0 <= ni < H and 0 <= nj < W):\n\t\t\tcontinue\n\t\tif s[ni][nj] == '#':\n\t\t\tis_ok = True\n\tif not is_ok:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = map(int, input().split())\ns = [[''] * W] * H\nfor i in range(H):\n\ts[i] = input()\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif s[i - 1][j] == '.' and s[i + 1][j] == '.' and (s[i][j + 1] == '.') and (s[i][j - 1] == '.') and (s[i][j] == '#'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nL = [list(input()) for _ in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif L[i][j] == '#':\n\t\t\tif i != 0 and L[i - 1][j] == '#':\n\t\t\t\tcontinue\n\t\t\tif i != H - 1 and L[i + 1][j] == '#':\n\t\t\t\tcontinue\n\t\t\tif j != 0 and L[i][j - 1] == '#':\n\t\t\t\tcontinue\n\t\t\tif j != W - 1 and L[i][j + 1] == '#':\n\t\t\t\tcontinue\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = [input() for i in range(h)]\na = '.' * (w + 2)\nans = 'Yes'\nfor _ in range(h):\n\tl[_] = '.' + l[_] + '.'\nl.append(a)\nl.insert(0, a)\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif l[i][j] == '#' and l[i - 1][j] == '.' and (l[i][j - 1] == '.') and (l[i + 1][j] == '.') and (l[i][j + 1] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "(h, w) = map(int, input().split())\ns = ['.' + input() + '.' for _ in range(h)]\ns = ['.' * (w + 2)] + s + ['.' * (w + 2)]\nflg = True\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\tif all((s[i + _i][j + _j] == '.' for (_i, _j) in [(1, 0), (0, 1), (-1, 0), (0, -1)])):\n\t\t\t\tflg = False\n\t\t\t\tbreak\nprint('Yes' if flg else 'No')\n", "hw = [int(i) for i in input().split()]\ns = ['.' + input() + '.' for i in range(hw[0])]\ns = ['.' * (hw[1] + 2)] + s + ['.' * (hw[1] + 2)]\nfor i in range(1, hw[0] + 1):\n\tfor n in range(1, hw[1] + 1):\n\t\tif s[i][n] == '#':\n\t\t\tif s[i + 1][n] == s[i][n + 1] == s[i - 1][n] == s[i][n - 1] == '.':\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "import sys\ninput = sys.stdin.readline\n(H, W) = map(int, input().split())\nvP = ['.' * (W + 2)]\nmM = vP + ['.' + input() + '.' for _ in [0] * H] + vP\nmD = [(-1, 0), (1, 0), (0, -1), (0, 1)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif mM[i][j] == '#' and all((mM[i + x][j + y] == '.' for (x, y) in mD)):\n\t\t\tprint('No')\n\t\t\texit(0)\nprint('Yes')\n", "from itertools import product\n(H, W) = map(int, input().split())\nS = [input() for i in range(H)]\nisOK = True\nfor (y, x) in product(range(H), range(W)):\n\tif S[y][x] == '.':\n\t\tcontinue\n\tsum = 0\n\tif 0 < x:\n\t\tif S[y][x - 1] == '#':\n\t\t\tsum += 1\n\tif x < W - 1:\n\t\tif S[y][x + 1] == '#':\n\t\t\tsum += 1\n\tif 0 < y:\n\t\tif S[y - 1][x] == '#':\n\t\t\tsum += 1\n\tif y < H - 1:\n\t\tif S[y + 1][x] == '#':\n\t\t\tsum += 1\n\tif sum == 0:\n\t\tisOK = False\nif isOK:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = list(map(int, input().split()))\ns = ['.' + input() + '.' for _ in range(h)]\ns = ['.' * (w + 2)] + s + ['.' * (w + 2)]\nfor y in range(1, h + 1):\n\tfor x in range(1, w + 1):\n\t\tif s[y][x] == '#' and all((s[y + dy][x + dx] == '.' for (dy, dx) in [(1, 0), (0, 1), (-1, 0), (0, -1)])):\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "import sys\n\ndef check(i, j, s_list, h, w):\n\tuesita_list = [-1, 1]\n\tsayuu_list = [-1, 1]\n\tfor uesita in uesita_list:\n\t\tnew_i = i + uesita\n\t\tif new_i < 0 or new_i > h - 1:\n\t\t\tcontinue\n\t\tif s_list[new_i][j] == '#':\n\t\t\treturn True\n\tfor sayuu in sayuu_list:\n\t\tnew_j = j + sayuu\n\t\tif new_j > w - 1 or new_j < 0:\n\t\t\tcontinue\n\t\tif s_list[i][new_j] == '#':\n\t\t\treturn True\n\treturn False\ninput = sys.stdin.readline\n(h, w) = list(map(int, input().split()))\ns_list = [[0 for _ in range(w)] for _ in range(h)]\nfor i in range(h):\n\tw_s_list = input()\n\tw_s_list = w_s_list.replace('\\n', '')\n\tw_s_list = list(w_s_list)\n\tfor j in range(w):\n\t\ts_list[i][j] = w_s_list[j]\nfor i in range(h):\n\tfor j in range(w):\n\t\ts = s_list[i][j]\n\t\tif s == '#':\n\t\t\tok_flag = check(i, j, s_list, h, w)\n\t\t\tif not ok_flag:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns = ['.' * (W + 2)] + ['.' + input() + '.' for i in range(H)] + ['.' * (W + 2)]\nans = 'Yes'\nfor h in range(1, H + 1):\n\tfor w in range(1, W + 1):\n\t\tif s[h][w] == '#':\n\t\t\tif '#' not in [s[h - 1][w], s[h + 1][w], s[h][w - 1], s[h][w + 1]]:\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\nprint(ans)\n", "(h, w) = map(int, input().split())\nmat = []\nmat.append('.' * (w + 2))\nfor i in range(h):\n\ts = input()\n\tmat.append('.' + s + '.')\nmat.append('.' * (w + 2))\nfor x in range(1, w + 1):\n\tfor y in range(1, h + 1):\n\t\tif mat[y][x] == '#' and mat[y - 1][x] == '.' and (mat[y + 1][x] == '.') and (mat[y][x - 1] == '.') and (mat[y][x + 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "def main():\n\t(H, W) = list(map(int, input().split()))\n\tans = 'Yes'\n\tgrid = [['*'] * (W + 2) for _ in range(H + 2)]\n\tdir = [[1, 0], [-1, 0], [0, 1], [0, -1]]\n\tfor i in range(H):\n\t\tS = list(input())\n\t\tfor j in range(W):\n\t\t\tgrid[i + 1][j + 1] = S[j]\n\tfor i in range(H):\n\t\tfor j in range(W):\n\t\t\tif grid[i + 1][j + 1] == '#':\n\t\t\t\tflg = True\n\t\t\t\tfor (x, y) in dir:\n\t\t\t\t\tif grid[i + 1 + x][j + 1 + y] == '#':\n\t\t\t\t\t\tflg = False\n\t\t\t\tif flg:\n\t\t\t\t\tans = 'No'\n\tprint(ans)\n\ndef __starting_point():\n\tmain()\n__starting_point()\n", "(H, W) = list(map(int, input().split()))\nsq = [list(input()) for i in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif sq[i][j] == '#':\n\t\t\ttemp = 0\n\t\t\tif j != 0:\n\t\t\t\tif sq[i][j - 1] == '#':\n\t\t\t\t\ttemp += 1\n\t\t\tif j != W - 1:\n\t\t\t\tif sq[i][j + 1] == '#':\n\t\t\t\t\ttemp += 1\n\t\t\tif i != 0:\n\t\t\t\tif sq[i - 1][j] == '#':\n\t\t\t\t\ttemp += 1\n\t\t\tif i != H - 1:\n\t\t\t\tif sq[i + 1][j] == '#':\n\t\t\t\t\ttemp += 1\n\t\t\tif temp == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "import sys\n\ndef LI():\n\treturn list(map(int, input().split()))\n\ndef LSH(h):\n\treturn [input() for _ in range(h)]\n(H, W) = LI()\nmasu = LSH(H)\nfor i in range(H):\n\tfor j in range(W):\n\t\tok = 0\n\t\tif masu[i][j] == '.':\n\t\t\tcontinue\n\t\tif j + 1 < W:\n\t\t\tif masu[i][j + 1] == '#':\n\t\t\t\tok = 1\n\t\tif j - 1 >= 0:\n\t\t\tif masu[i][j - 1] == '#':\n\t\t\t\tok = 1\n\t\tif i + 1 < H:\n\t\t\tif masu[i + 1][j] == '#':\n\t\t\t\tok = 1\n\t\tif i - 1 >= 0:\n\t\t\tif masu[i - 1][j] == '#':\n\t\t\t\tok = 1\n\t\tif ok == 0:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\nans = 'Yes'\ns = []\nfor i in range(h):\n\ts += input().split()\ns.insert(0, ''.join(['.'] * (w + 2)))\ns = list(map(lambda x: '.' + x + '.', s))\ns.insert(len(s), ''.join(['.'] * (w + 2)))\ns = list(map(list, s))\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\tflg_up = True if s[i - 1][j] == '.' else False\n\t\t\tflg_down = True if s[i + 1][j] == '.' else False\n\t\t\tflg_left = True if s[i][j - 1] == '.' else False\n\t\t\tflg_right = True if s[i][j + 1] == '.' else False\n\t\t\tif flg_up & flg_down & flg_left & flg_right:\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nprint(ans)\n", "(h, w) = map(int, input().split())\nA = []\nA.append('.' * (w + 2))\nfor i in range(h):\n\tA.append(list('.' + input() + '.'))\nA.append('.' * (w + 2))\nf = True\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif A[i][j] == '#' and A[i + 1][j] == '.' and (A[i - 1][j] == '.') and (A[i][j + 1] == '.') and (A[i][j - 1] == '.'):\n\t\t\tf = False\nif f:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\nS = ['.' * (w + 2)] + ['.' + input() + '.' for _ in range(h)] + ['.' * (w + 2)]\nfor i in range(h + 2):\n\tfor j in range(w + 2):\n\t\tif S[i][j] == '#':\n\t\t\tfor k in range(4):\n\t\t\t\tif S[i + 1][j] != '#' and S[i][j + 1] != '#' and (S[i - 1][j] != '#') and (S[i][j - 1] != '#'):\n\t\t\t\t\tprint('No')\n\t\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [input() for _ in range(h)]\nans = 'Yes'\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tif (i == 0 or s[i - 1][j] == '.') and (i == h - 1 or s[i + 1][j] == '.') and (j == 0 or s[i][j - 1] == '.') and (j == w - 1 or s[i][j + 1] == '.'):\n\t\t\t\tans = 'No'\nprint(ans)\n", "import sys\nimport copy\nimport math\nimport itertools\nimport numpy as np\n(H, W) = [int(c) for c in input().split()]\ns = [list(input()) for c in range(H)]\na = [[1 for c in range(W)] for d in range(H)]\nb = [[0 for c in range(W)] for d in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif s[i][j] == '#':\n\t\t\tif i - 1 >= 0:\n\t\t\t\tif s[i - 1][j] == '#':\n\t\t\t\t\ta[i][j] = 0\n\t\t\tif j - 1 >= 0:\n\t\t\t\tif s[i][j - 1] == '#':\n\t\t\t\t\ta[i][j] = 0\n\t\t\tif j + 1 < W:\n\t\t\t\tif s[i][j + 1] == '#':\n\t\t\t\t\ta[i][j] = 0\n\t\t\tif i + 1 < H:\n\t\t\t\tif s[i + 1][j] == '#':\n\t\t\t\t\ta[i][j] = 0\n\t\telse:\n\t\t\ta[i][j] = 0\n\t\tif a[i][j] == 1:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(y, x) = map(int, input().split())\ng = [input() for i in range(y)]\nflag = True\nfor yy in range(1, y - 1):\n\tfor xx in range(1, x - 1):\n\t\tif g[yy][xx] == '#':\n\t\t\tif g[yy - 1][xx] == g[yy + 1][xx] == g[yy][xx - 1] == g[yy][xx + 1] == '.':\n\t\t\t\tflag = False\nif flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\ns = []\ns.append(['.'] * (w + 2))\nfor i in range(h):\n\ts.append([a for a in input()])\n\ts[i + 1].insert(0, '.')\n\ts[i + 1].append('.')\ns.append(['.'] * (w + 2))\ncheck = True\nfor j in range(1, h + 1):\n\tfor k in range(1, w + 1):\n\t\tif s[j][k] == '#':\n\t\t\tif s[j + 1][k] == '.' and s[j - 1][k] == '.' and (s[j][k + 1] == '.') and (s[j][k - 1] == '.'):\n\t\t\t\tcheck = False\nprint('Yes' if check else 'No')\n", "(h, w) = map(int, input().split())\ns = [input() for i in range(h)]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i + 1][j] == '#' or s[i - 1][j] == '#' or s[i][j + 1] == '#' or (s[i][j - 1] == '#'):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nss = [input() for i in range(h)]\nsm = ['.' + s + '.' for s in ss]\nmm = ['.' * (w + 2)] + sm + ['.' * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif mm[i][j] == '#' and mm[i][j - 1] == '.' and (mm[i][j + 1] == '.') and (mm[i - 1][j] == '.') and (mm[i + 1][j] == '.'):\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nc = [input() for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif c[i][j] == '#':\n\t\t\tupper = c[i - 1][j] == '#' if 0 <= i - 1 else False\n\t\t\tlower = c[i + 1][j] == '#' if i + 1 < h else False\n\t\t\tleft = c[i][j - 1] == '#' if 0 <= j - 1 else False\n\t\t\tright = c[i][j + 1] == '#' if j + 1 < w else False\n\t\t\tif not (upper or lower or left or right):\n\t\t\t\tprint('No')\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nelse:\n\tprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [[0] * (w + 2)] + [[0] + list(input()) + [0] for _ in range(h)] + [[0] * (w + 2)]\nfor i in range(h + 2):\n\tfor j in range(w + 2):\n\t\tif s[i][j] == '#' and s[i + 1][j] != '#' and (s[i - 1][j] != '#') and (s[i][j + 1] != '#') and (s[i][j - 1] != '#'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nM = []\nM.append('.' * (W + 2))\nM += ['.' + input() + '.' for _ in range(H)]\nM.append('.' * (W + 2))\nfor h in range(1, H + 1):\n\tfor w in range(1, W + 1):\n\t\tif M[h][w] == '#' and '....' == M[h][w + 1] + M[h][w - 1] + M[h + 1][w] + M[h - 1][w]:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nL = [list(input()) for _ in range(H)]\nN = L.count('#')\nfor i in range(H):\n\tfor j in range(W):\n\t\tif L[i][j] == '#':\n\t\t\tif not (i - 1 >= 0 and L[i - 1][j] == '#' or (j - 1 >= 0 and L[i][j - 1] == '#') or (i + 1 < H and L[i + 1][j] == '#') or (j + 1 < W and L[i][j + 1] == '#')):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\nsquare = []\nfor _ in range(h):\n\tsquare.append(input())\n\ndef check(i, j):\n\tflg = False\n\tfor (di, dj) in [[-1, 0], [1, 0], [0, -1], [0, 1]]:\n\t\tif di + i < 0 or dj + j < 0:\n\t\t\tcontinue\n\t\tif di + i >= h or dj + j >= w:\n\t\t\tcontinue\n\t\tif square[di + i][dj + j] == '#':\n\t\t\tflg = True\n\treturn flg\nfor i in range(h):\n\tfor j in range(w):\n\t\tif square[i][j] == '#':\n\t\t\tif not check(i, j):\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = [input() for _ in range(h)]\nnb = [(0, 1), (1, 0), (0, -1), (-1, 0)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif l[i][j] == '#':\n\t\t\tfor (a, b) in nb:\n\t\t\t\tif 0 <= i + a <= h - 1 and 0 <= j + b <= w - 1 and (l[i + a][j + b] == '#'):\n\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\na = [input() for _ in range(h)]\nflag = False\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif a[i][j] == '#' and a[i][j + 1] == '.' and (a[i + 1][j] == '.') and (a[i - 1][j] == '.') and (a[i][j - 1] == '.'):\n\t\t\tflag = True\nif flag:\n\tprint('No')\nelse:\n\tprint('Yes')\n", "(h, w) = map(int, input().split())\nlis = [list(input()) for i in range(h)]\nans = [[0] * w for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\t(x, y) = (0, 0)\n\t\tif lis[i][j] == '#':\n\t\t\tans[i][j] = 1\n\t\t\tfor a in range(-1, 2):\n\t\t\t\tif 0 <= i + a < h and lis[i + a][j] == '#' and (a != 0):\n\t\t\t\t\tx += 1\n\t\t\tans[i][j] += x\n\t\t\tfor b in range(-1, 2):\n\t\t\t\tif 0 <= j + b < w and lis[i][j + b] == '#' and (b != 0):\n\t\t\t\t\ty += 1\n\t\t\tans[i][j] += y\n\t\t\tif ans[i][j] == 1:\n\t\t\t\tprint('No')\n\t\t\t\treturn\n\t\telse:\n\t\t\tans[i][j] = 0\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [list(input()) for i in range(h)]\nfor i in range(h):\n\ts[i].insert(0, '.')\n\ts[i].append('.')\ns.insert(0, ['.'] * (w + 2))\ns.append(['.'] * (w + 2))\nflag = True\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i - 1][j] == '#' or s[i + 1][j] == '#' or s[i][j - 1] == '#' or (s[i][j + 1] == '#'):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tflag = False\n\t\t\t\tbreak\n\tif flag == False:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nmasu = [['.' for _ in range(W + 2)] for _ in range(H + 2)]\nfor i in range(H):\n\tmasu[i + 1][1:W + 1] = input()\nresult = [[0 for _ in range(W)] for _ in range(H)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif masu[i][j] == '#':\n\t\t\tx = masu[i - 1][j] + masu[i][j - 1] + masu[i][j + 1] + masu[i + 1][j]\n\t\t\tif x.count('#') == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "import sys\n(H, W) = map(int, input().split())\nlsHW = [['.' for i in range(W + 2)]]\nfor i in range(H):\n\tSls = ['.'] + list(input()) + ['.']\n\tlsHW.append(Sls)\nlsHW.append(['.' for i in range(W + 2)])\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif lsHW[i][j] == '.':\n\t\t\tcontinue\n\t\telif not (lsHW[i - 1][j] == '#' or lsHW[i + 1][j] == '#' or lsHW[i][j - 1] == '#' or (lsHW[i][j + 1] == '#')):\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nC = ['.' * (W + 2)]\nfor i in range(H):\n\tC += ['.' + input() + '.']\nC += ['.' * (W + 2)]\nresult = 'Yes'\nfor i in range(1, H + 2):\n\tfor j in range(1, W + 2):\n\t\tif C[i][j] == '#':\n\t\t\tif '#' not in [C[i + 1][j], C[i - 1][j], C[i][j + 1], C[i][j - 1]]:\n\t\t\t\tresult = 'No'\nprint(result)\n", "(h, w) = map(int, input().split())\ns = eval('input(),' * h)\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '.':\n\t\t\tcontinue\n\t\tfor (y, x) in ((i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1)):\n\t\t\tif h > y >= 0 and w > x >= 0 and (s[y][x] == '#'):\n\t\t\t\tbreak\n\t\telse:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nlis = []\nfor i in range(h):\n\tlis.append(list(input()))\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif lis[i][j] == '#':\n\t\t\tif lis[i - 1][j] == '.' and lis[i + 1][j] == '.' and (lis[i][j - 1] == '.') and (lis[i][j + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nA = [['.'] * (w + 2)]\nfor i in range(h):\n\ts = list(input())\n\tA.append(['.'] + s + ['.'])\nA.append(['.'] * (w + 2))\nfor i in range(2, h + 1):\n\tfor j in range(2, w + 1):\n\t\tif A[i][j] == '#' and A[i - 1][j] == '.' and (A[i + 1][j] == '.') and (A[i][j - 1] == '.') and (A[i][j + 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(lambda x: int(x), input().split())\ns = []\ns.append('.' * (w + 2))\nfor i in range(h):\n\ts.append('.' + input() + '.')\ns.append('.' * (w + 2))\nans = 'Yes'\nfor i in range(1, h + 2):\n\tfor j in range(1, w + 2):\n\t\tif s[i][j] == '#' and s[i - 1][j] == '.' and (s[i + 1][j] == '.') and (s[i][j - 1] == '.') and (s[i][j + 1] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "(col, row) = [int(x) for x in input().split()]\nmap_list = [[0] * (row + 2)]\nfor i in range(col):\n\tmap_list.append(['0'] + list(input()) + ['0'])\nmap_list.append(map_list[0])\n\ndef check(x, y):\n\tlands = [[x, y]]\n\tarea = 0\n\tsealine = 0\n\twhile lands:\n\t\t(x, y) = lands.pop()\n\t\tarea += 1\n\t\tmap_list[y][x] = '2'\n\t\tif map_list[y + 1][x] == '#':\n\t\t\tlands.append([x, y + 1])\n\t\telif not map_list[y + 1][x] == '2':\n\t\t\tsealine += 1\n\t\tif map_list[y][x + 1] == '#':\n\t\t\tlands.append([x + 1, y])\n\t\telif not map_list[y][x + 1] == '2':\n\t\t\tsealine += 1\n\t\tif map_list[y - 1][x] == '#':\n\t\t\tlands.append([x, y - 1])\n\t\telif not map_list[y - 1][x] == '2':\n\t\t\tsealine += 1\n\t\tif map_list[y][x - 1] == '#':\n\t\t\tlands.append([x - 1, y])\n\t\telif not map_list[y][x - 1] == '2':\n\t\t\tsealine += 1\n\t\tlands = list(map(tuple, lands))\n\t\tlands = list(set(lands))\n\treturn area\nres = 'Yes'\nfor i in range(1, col + 1):\n\tfor j in range(1, row + 1):\n\t\tif map_list[i][j] == '#':\n\t\t\tif check(j, i) == 1:\n\t\t\t\tres = 'No'\nprint(res)\n", "(H, W) = list(map(int, input().split()))\nS = ['.' * (W + 2)]\nS += ['.' + input() + '.' for i in range(H)]\nS += ['.' * (W + 2)]\nng = False\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif S[i][j] != '#':\n\t\t\tcontinue\n\t\tfor (y, x) in ((0, 1), (0, -1), (1, 0), (-1, 0)):\n\t\t\tif S[i + y][j + x] == '#':\n\t\t\t\tbreak\n\t\telse:\n\t\t\tng = True\nprint('YNeos'[ng::2])\n", "(h, w) = list(map(int, input().split()))\nans = 'Yes'\ns = []\nfor i in range(h):\n\ts += input().split()\ns = list(map(list, s))\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tif i > 0:\n\t\t\t\tflg_up = False if s[i - 1][j] == '#' else True\n\t\t\telse:\n\t\t\t\tflg_up = True\n\t\t\tif i < h - 1:\n\t\t\t\tflg_down = False if s[i + 1][j] == '#' else True\n\t\t\telse:\n\t\t\t\tflg_down = True\n\t\t\tif j > 0:\n\t\t\t\tflg_left = False if s[i][j - 1] == '#' else True\n\t\t\telse:\n\t\t\t\tflg_left = True\n\t\t\tif j < w - 1:\n\t\t\t\tflg_right = False if s[i][j + 1] == '#' else True\n\t\t\telse:\n\t\t\t\tflg_right = True\n\t\t\tif flg_up & flg_down & flg_left & flg_right:\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nprint(ans)\n", "import sys\ninput = sys.stdin.readline\n\ndef main():\n\t(H, W) = list(map(int, input().split()))\n\tfield = []\n\tfor _ in range(H):\n\t\ttmp = list(input()[:-1])\n\t\tfield.append(tmp)\n\tfrom collections import deque\n\tdigtmp = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n\tfor h in range(H):\n\t\tfor w in range(W):\n\t\t\t(a, b) = (h, w)\n\t\t\tflag = False\n\t\t\tif field[a][b] == '.':\n\t\t\t\tcontinue\n\t\t\tfor (dx, dy) in digtmp:\n\t\t\t\tx = a + dx\n\t\t\t\ty = b + dy\n\t\t\t\tif not (0 <= x < H and 0 <= y < W):\n\t\t\t\t\tcontinue\n\t\t\t\tif field[x][y] == '#':\n\t\t\t\t\tflag = True\n\t\t\t\t\tcontinue\n\t\t\tif not flag:\n\t\t\t\tprint('No')\n\t\t\t\treturn\n\tprint('Yes')\n\ndef __starting_point():\n\tmain()\n__starting_point()\n", "(h, w) = map(int, input().split())\ns = []\ns.append(['.'] * (w + 2))\nfor _ in range(h):\n\ts.append(['.'] + list(input()) + ['.'])\ns.append(['.'] * (w + 2))\nflag = True\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#' and s[i - 1][j] == '.' and (s[i][j - 1] == '.') and (s[i + 1][j] == '.') and (s[i][j + 1] == '.'):\n\t\t\tflag = False\nprint('Yes' if flag else 'No')\n", "(H, W) = map(int, input().split())\nS = ['.' + input() + '.' for _ in range(H)]\nS = ['.' * (W + 2)] + S + ['.' * (W + 2)]\nflag = 'Yes'\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i - 1][j] == '.' and S[i + 1][j] == '.' and (S[i][j - 1] == '.') and (S[i][j + 1] == '.'):\n\t\t\t\tflag = 'No'\nprint(flag)\n", "(h, w) = map(int, input().split())\nlll = [list('.' * (w + 2))]\nG = [list('.' + input() + '.') for _ in range(h)]\nG = lll + G + lll\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif G[i][j] == '#' and G[i - 1][j] == G[i + 1][j] == G[i][j - 1] == G[i][j + 1] == '.':\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\ntable = [list(input()) for _ in range(h)]\nmx = [0, 1, 0, -1]\nmy = [1, 0, -1, 0]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif table[i][j] == '#':\n\t\t\tfor k in range(4):\n\t\t\t\t(tx, ty) = (j + mx[k], i + my[k])\n\t\t\t\tif 0 <= tx < w and 0 <= ty < h and (table[ty][tx] == '#'):\n\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nX = [[[0, 1][a == '#'] for a in input()] + [0] for i in range(H)] + [[0] * (W + 1)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif X[i][j] == 1 and X[i][j - 1] == X[i - 1][j] == X[i][j + 1] == X[i + 1][j] == 0:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "import sys\n(h, w) = map(int, input().split())\ns = [list(input()) for _ in range(h)]\nfor i in range(h - 1):\n\tfor j in range(w - 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i + 1][j] == '#' or s[i - 1][j] == '#' or s[i][j + 1] == '#' or (s[i][j - 1] == '#'):\n\t\t\t\tpass\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nprint('Yes')\n", "def check(H, W, s, x, y):\n\tres = False\n\tif x - 1 >= 0 and s[y][x - 1] == '#':\n\t\tres = True\n\tif x + 1 < W and s[y][x + 1] == '#':\n\t\tres = True\n\tif y - 1 >= 0 and s[y - 1][x] == '#':\n\t\tres = True\n\tif y + 1 < H and s[y + 1][x] == '#':\n\t\tres = True\n\treturn res\n(H, W) = map(int, input().split())\ns = []\nfor h in range(H):\n\ts.append(list(input()))\nfor y in range(H):\n\tfor x in range(W):\n\t\tif s[y][x] == '#' and (not check(H, W, s, x, y)):\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = ['.' * (W + 2)] + ['.' + input() + '.' for h in range(H)] + ['.' * (W + 2)]\nfor h in range(1, H - 1):\n\tfor w in range(1, W - 1):\n\t\tif S[h][w] == '#' and S[h - 1][w] == '.' and (S[h + 1][w] == '.') and (S[h][w - 1] == '.') and (S[h][w + 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() + '.' for _ in range(H)] + ['.' * (W + 2)]\nprint(('Yes', 'No')[any((S[y - 1][x] == S[y + 1][x] == S[y][x - 1] == S[y][x + 1] == '.' for y in range(H) for x in range(W) if S[y][x] == '#'))])\n", "(h, w) = map(int, input().split())\nlst = [input() for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif lst[i][j] == '#':\n\t\t\tif lst[max(0, i - 1)][j] == lst[min(h - 1, i + 1)][j] == lst[i][max(0, j - 1)] == lst[i][min(w - 1, j + 1)] == '.':\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = []\nfor i in range(H):\n\tS.append('.' + input() + '.')\nS = ['.' * (W + 2)] + S + ['.' * (W + 2)]\nflag = 1\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i - 1][j] == '.' and S[i + 1][j] == '.' and (S[i][j - 1] == '.') and (S[i][j + 1] == '.'):\n\t\t\t\tflag = 0\nprint('Yes' if flag else 'No')\n", "import numpy as np\n\ndef get_num_bomb(arr, i, j):\n\ttemp_arr = np.full([arr.shape[0] + 2, arr.shape[1] + 2], False)\n\ttemp_arr[1:1 + arr.shape[0], 1:1 + arr.shape[1]] = arr[:, :]\n\treturn temp_arr[i + 1, j] + temp_arr[i, j + 1] + temp_arr[i + 2, j + 1] + temp_arr[i + 1, j + 2]\n\ndef main():\n\t(h, w) = tuple([int(x) for x in input().split(' ')])\n\tarr = []\n\tret_arr = [[0] * w for i in range(h)]\n\tfor i in range(h):\n\t\tx = list([0 if x == '.' else 1 for x in input()])\n\t\tarr.append(x)\n\tarr = np.array(arr)\n\tfor i in range(h):\n\t\tfor j in range(w):\n\t\t\tif arr[i, j] == 1:\n\t\t\t\tif get_num_bomb(arr, i, j) == 0:\n\t\t\t\t\treturn 'No'\n\treturn 'Yes'\nprint(main())\n", "(h, w) = map(int, input().split())\na = [input() + '.' for i in range(h)] + ['.' * w]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif a[i][j] == '#':\n\t\t\tif any([a[i + 1][j] == a[i][j + 1] == a[i - 1][j] == a[i][j - 1] == '.']):\n\t\t\t\tprint('No')\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = map(int, input().split())\nS = []\nfor _ in range(H):\n\ts = list(input())\n\tS.append(s)\ncnt = [[0] * W for _ in range(H)]\nfor h in range(H):\n\tc = 0\n\tfor w in range(W):\n\t\tif S[h][w] == '#':\n\t\t\tc += 1\n\t\telse:\n\t\t\tif c == 1:\n\t\t\t\tcnt[h][w - 1] = 1\n\t\t\tc = 0\n\tif c == 1:\n\t\tcnt[h][w] = 1\nans = 'Yes'\nfor w in range(W):\n\tc = 0\n\tfor h in range(H):\n\t\tif S[h][w] == '#':\n\t\t\tc += 1\n\t\telse:\n\t\t\tif c == 1:\n\t\t\t\tif cnt[h - 1][w] == 1:\n\t\t\t\t\tans = 'No'\n\t\t\t\t\tbreak\n\t\t\tc = 0\n\tif c == 1:\n\t\tif cnt[h][w] == 1:\n\t\t\tans = 'No'\n\t\t\tbreak\nprint(ans)\n", "(h, w) = [int(x) for x in input().split()]\ns_list = [input() for _ in range(h)]\niso_flag = [[True] * w for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s_list[i][j] == '.':\n\t\t\tcontinue\n\t\tflag_r = True\n\t\tif j < w - 1 and s_list[i][j + 1] == '#':\n\t\t\tflag_r = iso_flag[i][j + 1] = False\n\t\tflag_d = True\n\t\tif i < h - 1 and s_list[i + 1][j] == '#':\n\t\t\tflag_d = iso_flag[i + 1][j] = False\n\t\tif iso_flag[i][j] and flag_r and flag_d:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\na = ['.' * (w + 2)]\nfor i in range(h):\n\tarr = '.' + str(input()) + '.'\n\ta.append(arr)\na.append('.' * (w + 2))\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif a[i][j] == '#' and a[i][j - 1] == a[i][j + 1] == a[i + 1][j] == a[i - 1][j] == '.':\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = ['.' * (w + 2)] + list(('.' + (input() + '.') for _ in range(h))) + ['.' * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif l[i][j] == '#':\n\t\t\tif l[i - 1][j] == '#' or l[i + 1][j] == '#' or l[i][j + 1] == '#' or (l[i][j - 1] == '#'):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nS = [['.'] * (w + 2)]\nfor i in range(h):\n\tS.append(['.'] + list(input()) + ['.'])\nS.append(['.'] * (w + 2))\nfor i in range(h + 2):\n\tfor j in range(w + 2):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i + 1][j] == '.' and S[i - 1][j] == '.' and (S[i][j + 1] == '.') and (S[i][j - 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\tquit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\np = [['.'] * (w + 2)] + [['.'] + list(map(str, input())) + ['.'] for i in range(h)] + [['.'] * (w + 2)]\nprint('Yes' if all([any([p[i + x[0]][I + x[1]] == '#' for x in [[0, 1], [0, -1], [1, 0], [-1, 0]]]) for I in range(1, w + 1) for i in range(1, h + 1) if p[i][I] == '#']) else 'No')\n", "(h, w) = map(int, input().split())\nS = []\nfor i in range(h):\n\tS.append(input())\nans = 'Yes'\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif S[i][j] == '#' and S[i + 1][j] == '.' and (S[i - 1][j] == '.') and (S[i][j + 1] == '.') and (S[i][j - 1] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = map(lambda x: int(x) + 2, input().split())\ngrid = '.' * W\nfor _ in range(H - 2):\n\tgrid += '.' + input() + '.'\ngrid += '.' * W\nFlag = True\nmove_list = [1, -1, W, -W]\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif grid[i * W + j] == '#' and all((grid[i * W + j + move] == '.' for move in move_list)):\n\t\t\tFlag = False\n\t\t\tbreak\nif Flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(H, W) = list(map(int, input().split()))\nS = ['.' * (W + 2)]\nS += ['.' + input() + '.' for i in range(H)]\nS += ['.' * (W + 2)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif S[i][j] != '#':\n\t\t\tcontinue\n\t\tfor (y, x) in ((0, 1), (0, -1), (1, 0), (-1, 0)):\n\t\t\tif S[i + y][j + x] == '#':\n\t\t\t\tbreak\n\t\telse:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = ['.' + input() + '.' for i in range(h)]\ns = ['.' * (w + 2)] + s + ['.' * (w + 2)]\nflag = 0\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i - 1][j] == '.' and s[i + 1][j] == '.' and (s[i][j - 1] == '.') and (s[i][j + 1] == '.'):\n\t\t\t\tflag = 1\nprint('Yes' if flag == 0 else 'No')\n", "(h, w) = map(int, input().split())\nS = [list(input()) for _ in range(h)]\ndrc = [[0, 1], [0, -1], [1, 0], [-1, 0]]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif S[i][j] == '#':\n\t\t\tif all([S[i + y][j + x] == '.' for (x, y) in drc if 0 <= j + x < w and 0 <= i + y < h]):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "import sys\n(h, w) = map(int, input().split())\ns = ['.' * (w + 2)] + ['.' + input() + '.' for i in range(h)] + ['.' * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\ta = s[i][j - 1] + s[i][j + 1] + s[i - 1][j] + s[i + 1][j]\n\t\t\tif a.count('#') == 0:\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nelse:\n\tprint('Yes')\n", "(H, W) = map(int, input().split())\ns = [list(input()) for _ in range(H)]\njougesayuu = [(-1, 0), (1, 0), (0, -1), (0, 1)]\ncheck = True\nfor i in range(H):\n\tfor j in range(W):\n\t\tif s[i][j] == '#':\n\t\t\tflag = False\n\t\t\tfor (n, m) in jougesayuu:\n\t\t\t\t(ni, nj) = (i + n, j + m)\n\t\t\t\tif ni < 0 or H <= ni or nj < 0 or (W <= nj):\n\t\t\t\t\tcontinue\n\t\t\t\tif s[ni][nj] == '#':\n\t\t\t\t\tflag = True\n\t\t\tif not flag:\n\t\t\t\tcheck = False\nprint('Yes' if check else 'No')\n", "(H, W) = map(int, input().split())\ns = ['.' * (W + 2)] + ['.' + input() + '.' for _ in range(H)] + ['.' * (W + 2)]\nfor hi in range(1, H + 1):\n\tfor wi in range(1, W + 1):\n\t\tif s[hi][wi] == '.':\n\t\t\tcontinue\n\t\tif s[hi - 1][wi] == '.' and s[hi + 1][wi] == '.':\n\t\t\tif s[hi][wi - 1] == '.' and s[hi][wi + 1] == '.':\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = []\nfor i in range(h):\n\tS = str(input())\n\ts.append(S)\nans = 1\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i - 1][j] != '#' and s[i + 1][j] != '#' and (s[i][j + 1] != '#') and (s[i][j - 1] != '#'):\n\t\t\t\tans = 0\nif ans == 1:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\ns = [list(input()) for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tc = 0\n\t\t\tfor (ni, nj) in [(i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)]:\n\t\t\t\tif 0 <= ni < h and 0 <= nj < w and (s[ni][nj] == '#'):\n\t\t\t\t\tc += 1\n\t\t\tif c == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [list(input()) for i in range(h)]\nans = 'Yes'\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#' and s[i - 1][j] == '.' and (s[i][j - 1] == '.') and (s[i + 1][j] == '.') and (s[i][j + 1] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = map(int, input().split())\ns = [input() for i in range(H)]\nfor y in range(H):\n\tfor x in range(W):\n\t\tif x - 1 < 0 or y - 1 < 0 or x + 1 > W - 1 or (y + 1 > H - 1):\n\t\t\tcontinue\n\t\tif s[y][x] == '#' and s[y + 1][x] != '#' and (s[y - 1][x] != '#') and (s[y][x + 1] != '#') and (s[y][x - 1] != '#'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = ['.' * (w + 2)] + ['.' + input() + '.' for _ in range(h)] + ['.' * (w + 2)]\nans = 'Yes'\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\tif '#' not in {s[i - 1][j], s[i + 1][j], s[i][j - 1], s[i][j + 1]}:\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\n\t\t\t\tbreak\nprint(ans)\n", "(H, W) = map(int, input().split())\nlist = ['.' + input() + '.' for i in range(H)]\nlist = ['.' * (W + 2)] + list + ['.' * (W + 2)]\na = 0\nfor h in range(H):\n\tfor w in range(W):\n\t\tif list[h][w] == '#':\n\t\t\tif list[h + 1][w] == '.' and list[h - 1][w] == '.' and (list[h][w - 1] == '.') and (list[h][w + 1] == '.'):\n\t\t\t\ta = 1\nprint('Yes' if a == 0 else 'No')\n", "(H, W) = map(int, input().split())\ngrid = []\nfor i in range(H):\n\tgrid.append([s for s in input()])\nfail_flg = False\nfor i in range(H):\n\tif fail_flg:\n\t\tbreak\n\tfor j in range(W):\n\t\tr_ij = grid[i][j]\n\t\tif r_ij == '.':\n\t\t\tcontinue\n\t\telse:\n\t\t\tc_ij = 0\n\t\t\tif 0 <= i <= H - 1 and 1 <= j <= W - 1:\n\t\t\t\tif grid[i][j - 1] == '#':\n\t\t\t\t\tc_ij += 1\n\t\t\tif 0 <= i <= H - 1 and 0 <= j <= W - 2:\n\t\t\t\tif grid[i][j + 1] == '#':\n\t\t\t\t\tc_ij += 1\n\t\t\tif 1 <= i <= H - 1 and 0 <= j <= W - 1:\n\t\t\t\tif grid[i - 1][j] == '#':\n\t\t\t\t\tc_ij += 1\n\t\t\tif 0 <= i <= H - 2 and 0 <= j <= W - 1:\n\t\t\t\tif grid[i + 1][j] == '#':\n\t\t\t\t\tc_ij += 1\n\t\t\tif c_ij == 0:\n\t\t\t\tfail_flg = True\n\t\t\t\tbreak\nif fail_flg:\n\tprint('No')\nelse:\n\tprint('Yes')\n", "(h, w) = map(int, input().split())\ns = ['.' * (w + 2)]\nfor i in range(h):\n\ts.append('.' + input() + '.')\ns.append('.' * (w + 2))\nans = 'Yes'\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '.':\n\t\t\tcontinue\n\t\tif s[i - 1][j] + s[i + 1][j] + s[i][j - 1] + s[i][j + 1] == '....':\n\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = map(int, input().split())\ns = []\nfor i in range(H):\n\ts.append(input())\nfor y in range(H - 1):\n\tfor x in range(W):\n\t\tif s[y][x] == '#':\n\t\t\tif s[y - 1][x] == '#' or s[y + 1][x] == '#' or s[y][x - 1] == '#' or (s[y][x + 1] == '#'):\n\t\t\t\tpass\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "import itertools\n(h, w) = map(int, input().split())\ns = [input() for i in range(h)]\nfor (i, j) in itertools.product(range(h), range(w)):\n\tif s[i][j] == '#' and (i == 0 or s[i - 1][j] == '.') and (j == 0 or s[i][j - 1] == '.') and (i == h - 1 or s[i + 1][j] == '.') and (j == w - 1 or s[i][j + 1] == '.'):\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')\n", "import sys\ninput = sys.stdin.readline\nd = '.'\ndn = '#'\n\ndef isPaintable(h, w, x, y, canvas):\n\tif x > 0:\n\t\tif canvas[y][x - 1] == dn:\n\t\t\treturn True\n\tif x < w - 1:\n\t\tif canvas[y][x + 1] == dn:\n\t\t\treturn True\n\tif y > 0:\n\t\tif canvas[y - 1][x] == dn:\n\t\t\treturn True\n\tif y < h - 1:\n\t\tif canvas[y + 1][x] == dn:\n\t\t\treturn True\n\treturn False\n\ndef main():\n\tans = 'Yes'\n\t(h, w) = map(int, input().split())\n\tcanvas = []\n\tfor _ in range(h):\n\t\ts = list(input().rstrip('\\n'))\n\t\tcanvas.append(s)\n\tfor y in range(h):\n\t\tif ans == 'No':\n\t\t\tbreak\n\t\tfor x in range(w):\n\t\t\tif canvas[y][x] == dn and (not isPaintable(h, w, x, y, canvas)):\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\n\tprint(ans)\n\ndef __starting_point():\n\tmain()\n__starting_point()\n", "(h, w) = list(map(int, input().split()))\ns = [list(input()) for _ in range(h)]\ndxy = [(1, 0), (0, 1), (-1, 0), (0, -1)]\nans = True\nfor i in range(h):\n\tfor j in range(w):\n\t\tcnt = 0\n\t\tif s[i][j] == '#':\n\t\t\tfor (p, q) in dxy:\n\t\t\t\tif not (0 <= i + p < h and 0 <= j + q < w):\n\t\t\t\t\tcnt += 1\n\t\t\t\t\tcontinue\n\t\t\t\telif s[i + p][j + q] == '.':\n\t\t\t\t\tcnt += 1\n\t\t\t\telse:\n\t\t\t\t\tcontinue\n\t\tif cnt == 4:\n\t\t\tans = False\nprint('Yes' if ans == True else 'No')\n", "(h, w) = map(int, input().split())\ns = [['.'] * (w + 2)]\nfor _ in range(h):\n\ts.append(['.'] + list(input()) + ['.'])\ns.append(['.'] * (w + 2))\nfor y in range(1, h + 1):\n\tfor x in range(1, w + 1):\n\t\tif s[y][x] == '#' and s[y - 1][x] == '.' and (s[y + 1][x] == '.') and (s[y][x - 1] == '.') and (s[y][x + 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nC = [list(input()) for i in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif C[i][j] == '#':\n\t\t\tif (i > 0 and C[i - 1][j] == '.') and (i < H - 1 and C[i + 1][j] == '.') and (j > 0 and C[i][j - 1] == '.') and (j < H - 1 and C[i][j + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [list(map(str, list(input()))) for i in range(h)]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#':\n\t\t\tif not (s[i + 1][j] == '#' or s[i - 1][j] == '#' or s[i][j + 1] == '#' or (s[i][j - 1] == '#')):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nk = [list(input()) for i in range(h)]\nans = True\nfor i in range(1, h - 2):\n\tfor j in range(1, w - 2):\n\t\tif k[i][j] == '#' and k[i - 1][j] == '.' and (k[i][j - 1] == '.') and (k[i + 1][j] == '.') and (k[i][j + 1] == '.'):\n\t\t\tans = False\nif ans:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(H, W) = map(int, input().split())\nA = [input() for i in range(H)]\nf = True\nfor i in range(H):\n\tfor j in range(W):\n\t\tif A[i][j] == '#':\n\t\t\tg = False\n\t\t\tfor (a, b) in [(-1, 0), (1, 0), (0, 1), (0, -1)]:\n\t\t\t\tif 0 <= i + a < H and 0 <= j + b < W:\n\t\t\t\t\tif A[i + a][j + b] == '#':\n\t\t\t\t\t\tg = True\n\t\t\tif not g:\n\t\t\t\tf = False\nprint('Yes' if f else 'No')\n", "(h, w) = map(int, input().split())\ns = [input() for _ in range(h)]\nflag = 1\nnx = [1, 0, -1, 0]\nny = [0, 1, 0, -1]\nfor y in range(h):\n\tfor x in range(w):\n\t\tif s[y][x] == '#':\n\t\t\tfor i in range(4):\n\t\t\t\t(tx, ty) = (x + nx[i], y + ny[i])\n\t\t\t\tif 0 <= ty and ty < h and (0 <= tx) and (tx < w):\n\t\t\t\t\tif s[ty][tx] == '#':\n\t\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\ntable = [input() for _ in range(h)]\nstep = [0, 1, 0, -1, 0]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif table[i][j] == '.':\n\t\t\tcontinue\n\t\tflag = False\n\t\tfor k in range(4):\n\t\t\t(ny, nx) = (i + step[k], j + step[k + 1])\n\t\t\tif nx < 0 or nx == w or ny < 0 or (ny == h):\n\t\t\t\tcontinue\n\t\t\tif table[ny][nx] == '#':\n\t\t\t\tflag = True\n\t\tif flag == False:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = ['.' * (W + 2)] + ['.' + input() + '.' for _ in range(H)] + ['.' * (W + 2)]\nfor y in range(1, H + 1):\n\tfor x in range(1, W + 1):\n\t\tif S[y][x] == '#' and (S[y - 1][x] + S[y + 1][x] + S[y][x - 1] + S[y][x + 1]).count('#') == 0:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nm = []\nfor i in range(H):\n\ts = input()\n\tt = []\n\tfor i in s:\n\t\tt.append(1 if i == '#' else 0)\n\tm.append(t)\nfor i in range(H):\n\tfor j in range(W):\n\t\tif m[i][j] == 0:\n\t\t\tcontinue\n\t\tcount = 0\n\t\tif i != 0:\n\t\t\tcount += m[i - 1][j]\n\t\tif i != H - 1:\n\t\t\tcount += m[i + 1][j]\n\t\tif j != 0:\n\t\t\tcount += m[i][j - 1]\n\t\tif j != W - 1:\n\t\t\tcount += m[i][j + 1]\n\t\tif count > 0:\n\t\t\tcontinue\n\t\telse:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns = [list(input()) for i in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif s[i][j] == '#':\n\t\t\tif s[max(0, i - 1)][j] == '.' and s[min(H - 1, i + 1)][j] == '.' and (s[i][max(0, j - 1)] == '.') and (s[i][min(W - 1, j + 1)] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\nans = 'Yes'\ns = []\nfor i in range(h):\n\ts += input().split()\ns.insert(0, ''.join(['.'] * (w + 2)))\ns = list(map(lambda x: '.' + x + '.', s))\ns.insert(len(s), ''.join(['.'] * (w + 2)))\ns = list(map(list, s))\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif (s[i][j] == '#') & (s[i - 1][j] == '.') & (s[i + 1][j] == '.') & (s[i][j - 1] == '.') & (s[i][j + 1] == '.'):\n\t\t\tans = 'No'\n\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nprint(ans)\n", "(h, w) = map(int, input().split())\nfield = ['.' * (w + 2)] + ['.' + input() + '.' for i in range(h)] + ['.' * (w + 2)]\nflag = 0\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif field[i][j] == '#':\n\t\t\tif '#' not in [field[i - 1][j], field[i + 1][j], field[i][j - 1], field[i][j + 1]]:\n\t\t\t\tflag = 1\n\t\t\t\tbreak\nif flag == 0:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "import sys\n(h, w) = map(int, input().split())\ns = [[0] * (w + 2)] + [[0] + list(map(int, list(input().replace('#', '1').replace('.', '0')))) + [0] for i in range(h)] + [[0] * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == 1:\n\t\t\tif s[i - 1][j] + s[i + 1][j] + s[i][j - 1] + s[i][j + 1] == 0:\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns = [input() for _ in range(H)]\nimport sys\nfor j in range(1, H - 1):\n\tfor i in range(1, W - 1):\n\t\tif s[j][i] == '#':\n\t\t\tif s[j][i - 1] == '#':\n\t\t\t\tpass\n\t\t\telif s[j - 1][i] == '#':\n\t\t\t\tpass\n\t\t\telif s[j][i + 1] == '#':\n\t\t\t\tpass\n\t\t\telif s[j + 1][i] == '#':\n\t\t\t\tpass\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\ngrid = [['.'] * (w + 2)] + [list('.' + input() + '.') for i in range(h)] + [['.'] * (w + 2)]\nfor s in range(1, 1 + h):\n\tfor t in range(1, 1 + w):\n\t\tif grid[s][t] == '#' and all([grid[s + x][t + y] == '.' for (x, y) in ([0, -1], [0, 1], [1, 0], [-1, 0])]):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "import sys\n(H, W) = list(map(int, input().split()))\nl = []\nfor i in range(H):\n\tl.append(list(input()))\nfor i in range(H):\n\tfor j in range(W):\n\t\tif l[i][j] == '.':\n\t\t\tpass\n\t\telse:\n\t\t\tcount = 0\n\t\t\tif i > 0 and l[i - 1][j] == '#':\n\t\t\t\tcount += 1\n\t\t\tif i < H - 1 and l[i + 1][j] == '#':\n\t\t\t\tcount += 1\n\t\t\tif j > 0 and l[i][j - 1] == '#':\n\t\t\t\tcount += 1\n\t\t\tif j < W - 1 and l[i][j + 1] == '#':\n\t\t\t\tcount += 1\n\t\t\tif count == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "import sys\n(h, w) = map(int, input().split())\nmat = ['.' + input() + '.' for _ in range(h)]\nmat = ['.' * (w + 2)] + mat + ['.' * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif mat[i][j] == '#':\n\t\t\tif mat[i + 1][j] == '.' and mat[i - 1][j] == '.' and (mat[i][j + 1] == '.') and (mat[i][j - 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nprint('Yes')\n", "import re\nimport copy\n\ndef accept_input():\n\t(H, W) = list(map(int, input().split()))\n\tS = []\n\tfor _ in range(H):\n\t\tS.append(input())\n\treturn (H, W, S)\n\ndef process(s):\n\tif s == '#':\n\t\treturn 1\n\telse:\n\t\treturn 0\n(H, W, S) = accept_input()\narr1 = [(-1, -1), (-1, 0), (-1, 1), (1, -1), (1, 0), (1, 1), (0, 1), (0, -1)]\narr = [(-1, 0), (1, 0), (0, 1), (0, -1)]\nnew_S = copy.deepcopy(S)\ng = 0\nb = 0\nfor i in range(H):\n\tfor j in range(W):\n\t\tif new_S[i][j] == '#':\n\t\t\tbl = 0\n\t\t\tfor idou in arr:\n\t\t\t\tif i + idou[0] == -1 or i + idou[0] == H:\n\t\t\t\t\tcontinue\n\t\t\t\telif j + idou[1] == -1 or j + idou[1] == W:\n\t\t\t\t\tcontinue\n\t\t\t\telif new_S[i + idou[0]][j + idou[1]] == '#':\n\t\t\t\t\tbl = 1\n\t\t\tif bl != 1:\n\t\t\t\tb = 1\n\t\t\t\tbreak\n\tif b == 1:\n\t\tbreak\nif b == 1:\n\tprint('No')\nelse:\n\tprint('Yes')\n", "(H, W) = input().split()\ndummy_list = ['.'] * (int(W) + 2)\nsquare_list = []\nsquare_list.append(dummy_list)\nfor i in range(int(H)):\n\twide_list = ['.']\n\twide_list = wide_list + list(input())\n\twide_list.append('.')\n\tsquare_list.append(wide_list)\nsquare_list.append(dummy_list)\nans = 'Yes'\nfor i in range(1, int(H) + 1):\n\tfor j in range(1, int(W) + 1):\n\t\tbefore_list = square_list[i - 1]\n\t\tcenter_list = square_list[i]\n\t\tafter_list = square_list[i + 1]\n\t\tif center_list[j] == '.':\n\t\t\tcontinue\n\t\tif before_list[j] == '.' and center_list[j - 1] == '.' and (center_list[j + 1] == '.') and (after_list[j] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "from itertools import product\nfrom collections import deque\nimport numpy as np\n\nclass Grid:\n\n\tdef __init__(self, grid, w=0, h=0, function=lambda x: x):\n\t\tself.w = w = w if w else len(grid[0])\n\t\tself.h = h = h if h else len(grid)\n\t\tdtype = type(function(grid[0][0]))\n\t\tself.grid = np.empty((h, w), dtype=dtype)\n\t\tfor (i, row) in zip(range(h), grid):\n\t\t\tfor (j, val) in zip(range(w), row):\n\t\t\t\tself.grid[i][j] = function(val)\n\n\tdef is_valid_x(self, x):\n\t\treturn 0 <= x < self.w\n\n\tdef is_valid_y(self, y):\n\t\treturn 0 <= y < self.h\n\n\tdef is_valid_xy(self, x, y):\n\t\treturn self.is_valid_x(x) and self.is_valid_y(y)\n\n\tdef __iter__(self):\n\t\treturn iter(self.grid)\n\n\tdef __repr__(self):\n\t\treturn '\\n'.join([' '.join(map(str, row)) for row in self.grid]) + '\\n'\n\n\tdef __getitem__(self, x):\n\t\treturn self.grid[x]\n\n\tdef __setitem__(self, x, val):\n\t\tself.grid[x] = val\n\ndef dfs(grid, root):\n\tstack = [root]\n\t(x, y) = root\n\tgrid[y, x] = '!'\n\twhile stack:\n\t\t(x, y) = stack.pop()\n\t\tyield (x, y)\n\t\tfor (dx, dy) in zip([1, 0, -1, 0], [0, 1, 0, -1]):\n\t\t\t(nx, ny) = (x + dx, y + dy)\n\t\t\tif grid.is_valid_xy(nx, ny) and grid[ny, nx] == '#':\n\t\t\t\tstack.append((nx, ny))\n\t\t\t\tgrid[ny, nx] = '!'\n(h, w) = map(int, input().split())\ngrid = Grid([input() for s in range(h)])\nfor (y, x) in product(range(h), range(w)):\n\tif grid[y, x] == '#':\n\t\tif len(list(dfs(grid, (x, y)))) == 1:\n\t\t\tprint('No')\n\t\t\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() for _ in range(H)]\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i + 1][j] == '#' or S[i][j + 1] == '#' or S[i - 1][j] == '#' or (S[i][j - 1] == '#'):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = [input() for i in range(h)]\nans = 'Yes'\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif l[i][j] == '#':\n\t\t\tif l[i - 1][j] == l[i + 1][j] == l[i][j - 1] == l[i][j + 1] == '.':\n\t\t\t\tans = 'No'\nprint(ans)\n", "(h, w) = map(int, input().split())\ng = [input() for _ in range(h)]\nfor x in range(1, h - 1):\n\tfor y in range(1, w - 1):\n\t\tif g[x][y] == '#' and all((g[x + dx][y + dy] == '.' for (dx, dy) in ((1, 0), (0, 1), (-1, 0), (0, -1)))):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nS = ['.' + input() + '.' for i in range(h)]\nS = ['.' * (w + 2)] + S + ['.' * (w + 2)]\nf = True\nfor i in range(h):\n\tfor j in range(w):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i - 1][j] == '.' and S[i][j - 1] == '.' and (S[i + 1][j] == '.') and (S[i][j + 1] == '.'):\n\t\t\t\tf = False\nprint('Yes' if f else 'No')\n", "(h, w) = map(int, input().split())\nc = tuple((tuple((0 if i == '.' else 1 for i in input())) for _ in range(h)))\nfor i in range(h):\n\tfor j in range(w):\n\t\tif c[i][j]:\n\t\t\tT = c[i - 1][j] if 0 <= i - 1 else 0\n\t\t\tB = c[i + 1][j] if i + 1 < h else 0\n\t\t\tL = c[i][j - 1] if 0 <= j - 1 else 0\n\t\t\tR = c[i][j + 1] if j + 1 < w else 0\n\t\t\tif not (T or B or L or R):\n\t\t\t\tprint('No')\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nelse:\n\tprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [input() for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\ttop = max(0, i - 1)\n\t\t\tbottom = min(h - 1, i + 1)\n\t\t\tright = min(w - 1, j + 1)\n\t\t\tleft = max(0, j - 1)\n\t\t\tif s[i][right] == s[i][left] == s[top][j] == s[bottom][j] == '.':\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nL = list((list(input()) for _ in range(H)))\nfor h in range(H):\n\tfor w in range(W):\n\t\tif L[h][w] == '#':\n\t\t\tif not any((0 <= h + d <= H - 1 and L[h + d][w] == '#' or (0 <= w + d <= W - 1 and L[h][w + d] == '#') for d in [-1, 1])):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\npicture = [input() for _ in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif picture[i][j] == '#':\n\t\t\tif i == 0 or picture[i - 1][j] == '.':\n\t\t\t\tif j == 0 or picture[i][j - 1] == '.':\n\t\t\t\t\tif i == H - 1 or picture[i + 1][j] == '.':\n\t\t\t\t\t\tif j == W - 1 or picture[i][j + 1] == '.':\n\t\t\t\t\t\t\tprint('No')\n\t\t\t\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [0] * (H + 2)\nfor i in range(1, H + 1):\n\tS[i] = '.' + input() + '.'\nS[0] = '.' * (W + 2)\nS[H + 1] = '.' * (W + 2)\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif S[i][j] == '#':\n\t\t\tcheck = [S[i - 1][j], S[i][j - 1], S[i + 1][j], S[i][j + 1]]\n\t\t\tif '#' not in check:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nSW = [input() for _ in range(h)]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif SW[i][j] == '#':\n\t\t\tif SW[i - 1][j] == '#' or SW[i + 1][j] == '#' or SW[i][j - 1] == '#' or (SW[i][j + 1] == '#'):\n\t\t\t\tpass\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() for _ in range(H)]\nd = [-1, 0, 1, 0, -1]\nb = 0\nfor h in range(H):\n\tfor w in range(W):\n\t\tif S[h][w] == '.':\n\t\t\tcontinue\n\t\tif any((S[h + x][w + y] == '#' for (x, y) in zip(d, d[1:]) if 0 <= h + x < H and 0 <= w + y < W)):\n\t\t\tcontinue\n\t\tb = 1\nprint('YNeos'[b::2])\n", "(h, w) = map(int, input().split())\na = ['.' * (w + 2)]\nfor i in range(h):\n\ta.append('.' + input() + '.')\na.extend(['.' * (w + 2)])\nflg = 0\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif a[i][j] == '#':\n\t\t\tif a[i - 1][j] == '.' and a[i][j - 1] == '.' and (a[i + 1][j] == '.') and (a[i][j + 1] == '.'):\n\t\t\t\tflg = 1\nif flg == 0:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\nS = []\nflag = True\nfor i in range(h):\n\tr = list(input())\n\tS.append(r)\nfor i in range(0, h - 1):\n\tfor j in range(0, w - 1):\n\t\tif S[i][j] == '#' and S[i - 1][j] == '.' and (S[i][j - 1] == '.') and (S[i + 1][j] == '.') and (S[i][j + 1] == '.'):\n\t\t\tflag = False\nif flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\nt = '.' * (w + 2)\nb = [t]\nfor i in range(h):\n\ts = str(input())\n\ts = '.' + s + '.'\n\tb.append(s)\nb.append(t)\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif b[i][j] == '#':\n\t\t\tif all([b[i - 1][j] == '.', b[i + 1][j] == '.', b[i][j - 1] == '.', b[i][j + 1] == '.']):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nL = ['.' + input() + '.' for _ in range(H)]\nL = ['.' * (W + 2)] + L + ['.' * (W + 2)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif L[i][j] == '#':\n\t\t\tl = [L[i - 1][j], L[i + 1][j], L[i][j - 1], L[i][j + 1]]\n\t\t\tif '#' not in l:\n\t\t\t\tprint('No')\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\nelse:\n\tprint('Yes')\n", "(h, w) = map(int, input().split())\nF = [list(input()) for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tcnt = 0\n\t\tif F[i][j] == '#':\n\t\t\tif 0 <= i - 1 < h:\n\t\t\t\tif F[i - 1][j] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif 0 <= i + 1 < h:\n\t\t\t\tif F[i + 1][j] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif 0 <= j - 1 < w:\n\t\t\t\tif F[i][j - 1] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif 0 <= j + 1 < w:\n\t\t\t\tif F[i][j + 1] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif cnt == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = ['.' * (w + 2)]\nfor i in range(h):\n\tl += ['.' + input() + '.']\nl += ['.' * (w + 2)]\nans = 0\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif l[i][j] == '.':\n\t\t\tcontinue\n\t\tif l[i + 1][j] == '#' or l[i - 1][j] == '#' or l[i][j + 1] == '#' or (l[i][j - 1] == '#'):\n\t\t\tcontinue\n\t\tans = 1\nprint('YNeos'[ans::2])\n", "import sys\n(h, w) = map(int, input().split())\na = ['.' * (w + 2)] + ['.' + input() + '.' for i in range(h)] + ['.' * (w + 2)]\nfor i in range(h):\n\tfor (j, q) in enumerate(a[i + 1]):\n\t\tif q == '#':\n\t\t\tif a[i][j] != '#' and a[i + 1][j - 1] != '#' and (a[i + 1][j + 1] != '#') and (a[i + 2][j] != '#'):\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = ['.' * (w + 2)]\nfor i in range(h):\n\ts.append('.' + input() + '.')\ns += ['.' * (w + 2)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i + 1][j + 1] == '#':\n\t\t\tif (s[i][j + 1] + s[i + 1][j] + s[i + 1][j + 2] + s[i + 2][j + 1]).count('.') == 4:\n\t\t\t\tprint('No')\n\t\t\t\tquit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\na = ['.' * (w + 2)] + ['.' + input() + '.' for _ in range(h)] + ['.' * (w + 2)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif a[i][j] == '#':\n\t\t\tif not (a[i + 1][j] == '#' or a[i - 1][j] == '#' or a[i][j + 1] == '#' or (a[i][j - 1] == '#')):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nMap = []\nfor i in range(H):\n\tMap.append(input())\nfor i in range(H):\n\tfor j in range(W):\n\t\tif Map[i][j] == '#':\n\t\t\tif i - 1 >= 0 and i + 1 < H and (j - 1 >= 0) and (j + 1 < W):\n\t\t\t\tif Map[i - 1][j] != '#' and Map[i + 1][j] != '#' and (Map[i][j - 1] != '#') and (Map[i][j + 1] != '#'):\n\t\t\t\t\tprint('No')\n\t\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nL = ['b' * (w + 2)] + ['b' + input() + 'b' for i in range(h)] + ['b' * (w + 2)]\nans = 'ahe'\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif L[i][j] == '#' and (L[i + 1][j] != '#' and L[i - 1][j] != '#' and (L[i][j + 1] != '#') and (L[i][j - 1] != '#')):\n\t\t\tans = 'No'\nif ans != 'No':\n\tans = 'Yes'\nprint(ans)\n", "(h, w) = map(int, input().split())\nd = [['.'] * (w + 2) for j in range(h + 2)]\nfor hh in range(h):\n\tmoji = input()\n\tfor ww in range(w):\n\t\td[hh + 1][ww + 1] = moji[ww]\nfor k in range(1, h + 1):\n\tfor l in range(1, w + 1):\n\t\tif d[k][l] == '#' and all((aa == '.' for aa in [d[k - 1][l], d[k + 1][l], d[k][l - 1], d[k][l + 1]])):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nS = ['.' + input() + '.' for i in range(h)]\nS = ['.' * (w + 2)] + S + ['.' * (w + 2)]\nr = 'Yes'\nfor i in range(h):\n\tfor j in range(w):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i - 1][j] == '.' and S[i + 1][j] == '.' and (S[i][j - 1] == '.') and (S[i][j + 1] == '.'):\n\t\t\t\tr = 'No'\n\t\t\t\tbreak\nprint(r)\n", "(H, W) = map(int, input().split())\nflag = True\nfield = [input() for i in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif field[i][j] == '#':\n\t\t\ttmp = False\n\t\t\tif i - 1 >= 0 and field[i - 1][j] == '#':\n\t\t\t\ttmp = True\n\t\t\tif i + 1 < H and field[i + 1][j] == '#':\n\t\t\t\ttmp = True\n\t\t\tif j - 1 >= 0 and field[i][j - 1] == '#':\n\t\t\t\ttmp = True\n\t\t\tif j + 1 < W and field[i][j + 1] == '#':\n\t\t\t\ttmp = True\n\t\t\tif tmp == False:\n\t\t\t\tflag = False\nif flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\nt = [['.'] * (w + 2)] + [['.'] + list(input()) + ['.'] for _ in range(h)] + [['.'] * (w + 2)]\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif t[i][j] == '.':\n\t\t\tcontinue\n\t\tif t[i - 1][j] == '.' and t[i + 1][j] == '.' and (t[i][j - 1] == '.') and (t[i][j + 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nS = [list(input()) for _ in range(H)]\nfor h in range(H):\n\tfor w in range(W):\n\t\tif S[h][w] == '.':\n\t\t\tcontinue\n\t\tif h != 0 and S[h - 1][w] == '#':\n\t\t\tcontinue\n\t\telif h != H - 1 and S[h + 1][w] == '#':\n\t\t\tcontinue\n\t\telif w != 0 and S[h][w - 1] == '#':\n\t\t\tcontinue\n\t\telif w != W - 1 and S[h][w + 1] == '#':\n\t\t\tcontinue\n\t\tprint('No')\n\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = [['.'] * (w + 2)]\nfor i in range(h):\n\ttmp = list(input())\n\ttmp.insert(0, '.')\n\ttmp.append('.')\n\ts.append(tmp)\nans = 'Yes'\nfor i in range(1, h):\n\tfor j in range(1, w):\n\t\tif s[i][j] == '#' and s[i][j + 1] != '#' and (s[i + 1][j] != '#') and (s[i][j - 1] != '#') and (s[i - 1][j] != '#'):\n\t\t\tans = 'No'\nprint(ans)\n", "(h, w) = list(map(int, input().split()))\ns = [input() for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '.':\n\t\t\tcontinue\n\t\tok = False\n\t\tfor (dx, dy) in [(1, 0), (0, 1), (0, -1), (-1, 0)]:\n\t\t\tnx = j + dx\n\t\t\tny = i + dy\n\t\t\tif 0 <= nx < w and 0 <= ny < h and (s[ny][nx] == '#'):\n\t\t\t\tok = True\n\t\tif not ok:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nfield = []\nfor h in range(H):\n\tfield.append(list(input()))\ndx = [0, 0, 1, -1]\ndy = [1, -1, 0, 0]\nans = 'Yes'\nfor h in range(H):\n\tfor w in range(W):\n\t\tif field[h][w] != '#':\n\t\t\tcontinue\n\t\tok = False\n\t\tfor i in range(4):\n\t\t\tnw = dx[i] + w\n\t\t\tnh = dy[i] + h\n\t\t\tif nw < 0 or W <= nw or nh < 0 or (H <= nh):\n\t\t\t\tcontinue\n\t\t\tif field[nh][nw] == '#':\n\t\t\t\tok = True\n\t\tif not ok:\n\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = map(int, input().split())\ns = [['.'] * (W + 2) for _ in range(H + 1)]\nfor i in range(H):\n\ts[1 + i][1:1 + W] = input()\nans = 'Yes'\nfor i in range(1, H):\n\tfor j in range(1, W):\n\t\tif s[i][j] != '#':\n\t\t\tcontinue\n\t\tif s[i - 1][j] == '.' and s[i + 1][j] == '.' and (s[i][j - 1] == '.') and (s[i][j + 1] == '.'):\n\t\t\tans = 'No'\nprint(ans)\n", "(h, w) = map(int, input().split())\nlis = []\nfor _ in range(h):\n\tlis.append(input())\nfor i in range(h):\n\tfor j in range(w):\n\t\tif lis[i][j] == '#':\n\t\t\tif (i == 0 or lis[i - 1][j] == '.') and (j == 0 or lis[i][j - 1] == '.') and (i == h - 1 or lis[i + 1][j] == '.') and (j == w - 1 or lis[i][j + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\tquit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\ncanvas = []\nfor i in range(H):\n\tcanvas.append(list(input()))\nfor i in range(H):\n\tfor j in range(W):\n\t\tcnt = 0\n\t\tif canvas[i][j] == '#':\n\t\t\tfor h in range(-1, 2):\n\t\t\t\tfor w in range(-1, 2):\n\t\t\t\t\tif canvas[min(max(i + h, 0), H - 1)][min(max(j + w, 0), W - 1)] == '#' and (abs(h) + abs(w)) % 2 == 1:\n\t\t\t\t\t\tcnt += 1\n\t\t\tif cnt == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(N, M) = map(int, input().split())\nc = 0\nl = []\nfor i in range(N):\n\tl.append(list(input()))\nN -= 1\nM -= 1\nfor i in range(N):\n\tfor j in range(M):\n\t\tif l[i][j] == '.':\n\t\t\tpass\n\t\telse:\n\t\t\tif i - 1 >= 0 and i + 1 <= N and (j - 1 >= 0) and (j + 1 <= M) and (l[i - 1][j] == '.') and (l[i + 1][j] == '.') and (l[i][j - 1] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == 0 and j - 1 >= 0 and (j + 1 <= M) and (l[i + 1][j] == '.') and (l[i][j - 1] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i - 1 >= 0 and i + 1 <= N and (j == 0) and (l[i - 1][j] == '.') and (l[i + 1][j] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == N and j - 1 >= 0 and (j + 1 <= M) and (l[i - 1][j] == '.') and (l[i][j - 1] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i - 1 >= 0 and i + 1 <= N and (j - 1 >= 0) and (j == M) and (l[i - 1][j] == '.') and (l[i + 1][j] == '.') and (l[i][j - 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == 0 and j == 0 and (l[i + 1][j] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == 0 and j == M and (l[i + 1][j] == '.') and (l[i][j - 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == N and j == 0 and (l[i - 1][j] == '.') and (l[i][j + 1] == '.'):\n\t\t\t\tc += 1\n\t\t\tif i == N and j == M and (l[i - 1][j] == '.') and (l[i][j - 1] == '.'):\n\t\t\t\tc += 1\nif c == 0:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(H, W) = map(int, input().split())\ns = ['.' + input() + '.' for _ in range(H)]\ns.insert(0, '.' * (W + 2))\ns.append('.' * (W + 2))\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif s[i][j] == '#' and (s[i - 1][j] + s[i][j - 1:j + 2] + s[i + 1][j]).count('#') == 1:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nhw = ['.' * (W + 2)]\nfor i in range(H):\n\thw.append('.' + input() + '.')\nhw.append('.' * (W + 2))\nans = 'Yes'\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif hw[i][j] == '#':\n\t\t\tif hw[i - 1][j] == '.' and hw[i][j - 1] == '.' and (hw[i][j + 1] == '.') and (hw[i + 1][j] == '.'):\n\t\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = map(int, input().split())\ngrid = [input() for _ in range(H)]\nflg = True\nfor i in range(H):\n\tfor j in range(W):\n\t\tif grid[i][j] == '.':\n\t\t\tcontinue\n\t\tflg2 = False\n\t\tif j > 0 and grid[i][j - 1] == '#':\n\t\t\tflg2 = True\n\t\tif j < W - 1 and grid[i][j + 1] == '#':\n\t\t\tflg2 = True\n\t\tif i > 0 and grid[i - 1][j] == '#':\n\t\t\tflg2 = True\n\t\tif i < H - 1 and grid[i + 1][j] == '#':\n\t\t\tflg2 = True\n\t\tif not flg2:\n\t\t\tflg = False\nprint(['No', 'Yes'][flg])\n", "(h, w) = map(int, input().split())\ng = [input() for _ in range(h)]\nfor x in range(h):\n\tfor y in range(w):\n\t\tif g[x][y] == '.':\n\t\t\tcontinue\n\t\tok = 0\n\t\tfor (dx, dy) in [(1, 0), (0, 1), (-1, 0), (0, -1)]:\n\t\t\t(nx, ny) = (x + dx, y + dy)\n\t\t\tif 0 <= nx < h and 0 <= ny < w:\n\t\t\t\tif g[nx][ny] == '#':\n\t\t\t\t\tok = 1\n\t\tif ok < 1:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ncount = 0\nS = ['.'] * (w + 2)\nT = [list(input()) for i in range(h)]\nfor i in range(h):\n\tT[i].insert(0, '.')\n\tT[i].append('.')\nT.insert(0, S)\nT.append(S)\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif T[i][j] == '#' and T[i - 1][j] == T[i][j - 1] == T[i + 1][j] == T[i][j + 1] == '.':\n\t\t\tcount += 1\nprint('Yes' if count == 0 else 'No')\n", "import re\nimport sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque, Counter\nfrom decimal import Decimal\nimport functools\n\ndef v():\n\treturn input()\n\ndef k():\n\treturn int(input())\n\ndef S():\n\treturn input().split()\n\ndef I():\n\treturn list(map(int, input().split()))\n\ndef X():\n\treturn list(input())\n\ndef L():\n\treturn list(input().split())\n\ndef l():\n\treturn list(map(int, input().split()))\n\ndef lcm(a, b):\n\treturn a * b // math.gcd(a, b)\nsys.setrecursionlimit(10 ** 6)\nmod = 10 ** 9 + 7\ncnt = 0\nans = 0\ninf = float('inf')\nal = 'abcdefghijklmnopqrstuvwxyz'\nAL = al.upper()\n(H, W) = I()\npad_s = ['.' * (W + 2)]\nfor h in range(H):\n\tpad_s.append('.' + input() + '.')\npad_s.append('.' * (W + 2))\nfor (i, ss) in enumerate(pad_s):\n\tfor (j, s) in enumerate(ss):\n\t\tif s == '#' and pad_s[i][j + 1] == '.' and (pad_s[i][j - 1] == '.') and (pad_s[i + 1][j] == '.') and (pad_s[i - 1][j] == '.'):\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = ['.' + input() + '.' for i in range(H)]\nS.append('.' * (W + 2))\nS.insert(0, '.' * (W + 2))\nF = 1\nfor i in range(H + 2):\n\tfor j in range(W + 2):\n\t\tif S[i][j] == '#' and S[i + 1][j] == S[i - 1][j] == S[i][j + 1] == S[i][j - 1] == '.':\n\t\t\tF = 0\n\t\t\tbreak\nprint(['No', 'Yes'][F])\n", "(h, w) = map(int, input().split())\ns = list()\nt = list()\na = [0 for i in range(w + 2)]\ns.append(a)\nfor i in range(h):\n\tb = str(input())\n\tc = list(('0' + b + '0').replace('.', '0').replace('#', '1'))\n\td = list(map(int, c))\n\ts.append(d)\n\tt.append(b)\ns.append(a)\nflag = 0\nfor j in range(1, h + 1):\n\tfor k in range(1, w + 1):\n\t\tif flag == 1:\n\t\t\tbreak\n\t\tif s[j][k] == 1:\n\t\t\tcnt = 0\n\t\t\tcnt = s[j - 1][k] + s[j][k - 1] + s[j][k + 1] + s[j + 1][k]\n\t\t\tif cnt == 0:\n\t\t\t\tflag = 1\n\t\t\t\tprint('No')\nif flag == 0:\n\tprint('Yes')\n", "(H, W) = list(map(int, input().split()))\nS = ['.' * (W + 2)]\nfor _ in range(H):\n\tS.append('.' + input() + '.')\nS.append('.' * (W + 2))\nfor h in range(1, H + 1):\n\tfor w in range(1, W + 1):\n\t\tif S[h][w] == '#':\n\t\t\tif '#' not in [S[h - 1][w], S[h][w - 1], S[h][w + 1], S[h + 1][w]]:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = [int(i) for i in input().split()]\nSS = [input() for _ in range(H)]\n\ndef get(lst, i, default=None):\n\ttry:\n\t\treturn lst[i]\n\texcept IndexError:\n\t\treturn default\nfor i in range(H):\n\tfor j in range(W):\n\t\ts = SS[i][j]\n\t\tif s == '#':\n\t\t\tif '#' not in [get(get(SS, i - 1, []), j), get(get(SS, i, []), j - 1), get(get(SS, i + 1, []), j), get(get(SS, i, []), j + 1)]:\n\t\t\t\tprint('No')\n\t\t\t\timport sys\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns_list = [input() for _ in range(H)]\nans = 'Yes'\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif s_list[i][j] == '#' and s_list[i - 1][j] == s_list[i + 1][j] == s_list[i][j - 1] == s_list[i][j + 1] == '.':\n\t\t\tans = 'No'\n\t\t\tbreak\nprint(ans)\n", "(h, w) = map(int, input().split())\ns = []\nfor i in range(h):\n\ts.append('.' + input() + '.')\ns = ['.' * (w + 2)] + s + ['.' * (w + 2)]\nans = 'Yes'\nfor i in range(1, h):\n\tfor j in range(1, w):\n\t\tif s[i][j] == '#':\n\t\t\tu = s[i - 1][j]\n\t\t\td = s[i + 1][j]\n\t\t\tl = s[i][j - 1]\n\t\t\tr = s[i][j + 1]\n\t\t\tif u == '.' and d == '.' and (l == '.') and (r == '.'):\n\t\t\t\tans = 'No'\nprint(ans)\n", "import sys\n(H, W) = map(int, input().split())\ns = [input() + '.' for _ in range(H)]\ns.append('.' * W)\nd = ((0, 1), (1, 0), (0, -1), (-1, 0))\nfor h in range(H):\n\tfor w in range(W):\n\t\tif s[h][w] == '#':\n\t\t\tif all([s[h + dh][w + dw] == '.' for (dh, dw) in d]):\n\t\t\t\tprint('No')\n\t\t\t\tsys.exit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = ['a' * (W + 2)] + [list('a' + input() + 'a') for i in range(H)] + ['a' * (W + 2)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i + 1][j + 1] == '#':\n\t\t\tif [S[i][j + 1], S[i + 1][j], S[i + 1][j + 2], S[i + 2][j + 1]].count('#') < 1:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = ['.' * (w + 2)] + ['.' + input() + '.' for _ in range(h)] + ['.' * (w + 2)]\nfor i in range(1, h + 2):\n\tfor j in range(1, w + 2):\n\t\tif s[i][j] == '#':\n\t\t\tif '#' not in (s[i - 1][j], s[i + 1][j], s[i][j - 1], s[i][j + 1]):\n\t\t\t\tprint('No')\n\t\t\t\texit()\n\t\t\telse:\n\t\t\t\tpass\n\t\telse:\n\t\t\tpass\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\ns = ['.' + input() + '.' for _ in range(h)]\ns = ['.' * (w + 2)] + s + ['.' * (w + 2)]\nfor y in range(1, h + 1):\n\tfor x in range(1, w + 1):\n\t\tif s[y][x] == '.':\n\t\t\tcontinue\n\t\tok = False\n\t\tfor (dy, dx) in [(1, 0), (0, 1), (-1, 0), (0, -1)]:\n\t\t\tif s[y + dy][x + dx] == '#':\n\t\t\t\tok = True\n\t\tif not ok:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "import sys\n(h, w) = map(int, input().split())\ns = [list(input()) for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#' and (i == 0 or s[i - 1][j] == '.') and (i == h - 1 or s[i + 1][j] == '.') and (j == 0 or s[i][j - 1] == '.') and (j == w - 1 or s[i][j + 1] == '.'):\n\t\t\tprint('No')\n\t\t\tsys.exit()\nprint('Yes')\n", "(N, M) = map(int, input().split())\np = [input() for i in range(N)]\nans = 'Yes'\nfor n in range(1, N - 1):\n\tfor m in range(1, M - 1):\n\t\tif p[n][m] == '#':\n\t\t\tif p[n - 1][m] != '#' and p[n][m - 1] != '#' and (p[n + 1][m] != '#') and (p[n][m + 1] != '#'):\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\nprint(ans)\n", "(H, W) = map(int, input().split())\nS = [['.'] * (W + 2)]\nfor i in range(H):\n\tS.append('.' + input() + '.')\nS.append('.' * (W + 2))\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i][j] == '#':\n\t\t\tif S[i - 1][j] == '.' and S[i + 1][j] == '.' and (S[i][j - 1] == '.') and (S[i][j + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns = []\nfor _ in range(H):\n\ts.append(input())\nFlg = 'Yes'\nfor i in range(H):\n\tfor j in range(W):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i][max(j - 1, 0)] == '.' and s[i][min(j + 1, W - 1)] == '.' and (s[min(i + 1, H - 1)][j] == '.') and (s[max(i - 1, 0)][j] == '.'):\n\t\t\t\tFlg = 'No'\nprint(Flg)\n", "import sys\nsys.setrecursionlimit(10 ** 8)\nini = lambda : int(sys.stdin.readline())\ninl = lambda : [int(x) for x in sys.stdin.readline().split()]\nins = lambda : sys.stdin.readline().rstrip()\ndebug = lambda *a, **kw: print('\\x1b[33m', *a, '\\x1b[0m', **dict(file=sys.stderr, **kw))\n\ndef solve():\n\t(h, w) = inl()\n\tgrid = [None] * h\n\tfor i in range(h):\n\t\tgrid[i] = ins()\n\tdx = [0, 0, 1, -1]\n\tdy = [1, -1, 0, 0]\n\tfor i in range(h):\n\t\tfor j in range(w):\n\t\t\tif grid[i][j] != '#':\n\t\t\t\tcontinue\n\t\t\tok = False\n\t\t\tfor k in range(4):\n\t\t\t\ti2 = i + dy[k]\n\t\t\t\tj2 = j + dx[k]\n\t\t\t\tif 0 <= i2 < h and 0 <= j2 < w and (grid[i2][j2] == '#'):\n\t\t\t\t\tok = True\n\t\t\t\t\tbreak\n\t\t\tif not ok:\n\t\t\t\treturn False\n\treturn True\nprint('Yes' if solve() else 'No')\n", "(h, w) = (int(i) for i in input().split())\ns = ['.' + input() + '.' for i in range(h)]\n(s, flag) = (['.' * (w + 2)] + s + ['.' * (w + 2)], True)\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#':\n\t\t\tif s[i - 1][j] == '.' and s[i + 1][j] == '.' and (s[i][j - 1] == '.') and (s[i][j + 1] == '.'):\n\t\t\t\tflag = False\nif flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = (int(i) for i in input().split())\ns = [input() for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tif i == 0 or s[i - 1][j] == '.':\n\t\t\t\tif i == h - 1 or s[i + 1][j] == '.':\n\t\t\t\t\tif j == 0 or s[i][j - 1] == '.':\n\t\t\t\t\t\tif j == w - 1 or s[i][j + 1] == '.':\n\t\t\t\t\t\t\tprint('No')\n\t\t\t\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\ns_list = [input() for i in range(H)]\nflag = True\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif s_list[i][j] == '#':\n\t\t\tif s_list[i - 1][j] == '.' and s_list[i + 1][j] == '.' and (s_list[i][j - 1] == '.') and (s_list[i][j + 1] == '.'):\n\t\t\t\tflag = False\n\t\t\t\tbreak\nif flag:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\narea = [input() for i in range(h)]\nxy = [(1, 0), (-1, 0), (0, 1), (0, -1)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif area[i][j] == '#':\n\t\t\tf = 0\n\t\t\tfor (x, y) in xy:\n\t\t\t\tif 0 <= i + y < h and 0 <= j + x < w and (area[i + y][j + x] == '#'):\n\t\t\t\t\tf = 1\n\t\t\tif f == 0:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() for i in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i][j] == '#':\n\t\t\tbk = sum([t[j].count('#') for t in S[max(0, i - 1):min(H, i + 2)]])\n\t\t\tbk += S[i][max(0, j - 1):min(W, j + 2)].count('#') - 1\n\t\t\tif bk == 1:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\nS = []\nfor i in range(h):\n\tS.append(list(input()))\ndx = [1, 0, -1, 0]\ndy = [0, 1, 0, -1]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif S[i][j] == '#':\n\t\t\tif all((S[i + dx[k]][j + dy[k]] == '.' for k in range(4))):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "import os\nimport sys\nimport numpy as np\n\ndef dfs(visited, maze, h, w):\n\tvisited[h, w] = -1\n\tif maze[h, w + 1] == 1 and visited[h, w + 1] == 1:\n\t\tdfs(visited, maze, h, w + 1)\n\tif maze[h, w - 1] == 1 and visited[h, w - 1] == 1:\n\t\tdfs(visited, maze, h, w - 1)\n\tif maze[h + 1, w] == 1 and visited[h + 1, w] == 1:\n\t\tdfs(visited, maze, h + 1, w)\n\tif maze[h - 1, w] == 1 and visited[h - 1, w] == 1:\n\t\tdfs(visited, maze, h - 1, w)\n\ndef check_maze(maze, h, w):\n\tif maze[h, w + 1] == 1:\n\t\treturn 1\n\telif maze[h, w - 1] == 1:\n\t\treturn 1\n\telif maze[h + 1, w] == 1:\n\t\treturn 1\n\telif maze[h - 1, w] == 1:\n\t\treturn 1\n\telse:\n\t\treturn 0\n\ndef main():\n\t(H, W) = list(map(int, input().split()))\n\tmaze = []\n\tfor _ in range(H):\n\t\tS = input()\n\t\tS = [1 if s == '#' else 0 for s in S]\n\t\tmaze.append(S)\n\tmaze = np.array(maze)\n\tmaze = np.pad(maze, [(1, 1), (1, 1)])\n\tvisited = np.copy(maze)\n\tfor h in range(1, H + 1):\n\t\tfor w in range(1, W + 1):\n\t\t\tif maze[h, w] == 1:\n\t\t\t\tflag = check_maze(maze, h, w)\n\t\t\t\tif flag == 0:\n\t\t\t\t\tprint('No')\n\t\t\t\t\treturn\n\tprint('Yes')\n\ndef __starting_point():\n\tmain()\n__starting_point()\n", "(h, w) = map(int, input().split())\ns = [list(map(lambda x: x == '#', list(input()))) for i in range(h)]\nf = 0\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j]:\n\t\t\ts[i][j] ^= 1\n\t\t\tif 1 ^ (s[max(0, i - 1)][j] or s[i][max(0, j - 1)] or s[i][min(w - 1, j + 1)] or s[min(h - 1, i + 1)][j]):\n\t\t\t\tf = 1\n\t\t\ts[i][j] ^= 1\nprint('YNeos'[f::2])\n", "(h, w) = map(int, input().split())\nS = [['.'] * (w + 2)] + [['.'] + list(input()) + ['.'] for _ in range(h)] + [['.'] * (w + 2)]\nans = 'Yes'\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif S[i][j] == '#' and S[i + 1][j] == '.' and (S[i - 1][j] == '.') and (S[i][j + 1] == '.') and (S[i][j - 1] == '.'):\n\t\t\tans = 'No'\n\t\t\tbreak\nprint(ans)\n", "(H, W) = map(int, input().split())\nx = [list(map(str, list(input()))) for l in range(H)]\nfor i in range(len(x)):\n\tx[i].insert(0, '.')\n\tx[i].append('.')\nx.insert(0, ['.'] * (W + 2))\nx.append(['.'] * (W + 2))\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif x[i][j] == '#':\n\t\t\tif x[i][j - 1] == x[i][j + 1] == x[i - 1][j] == x[i + 1][j] == '.':\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() for i in range(H)]\ndy = [0, 1, 0, -1]\ndx = [1, 0, -1, 0]\nfor y in range(H):\n\tfor x in range(W):\n\t\tif S[y][x] == '.':\n\t\t\tcontinue\n\t\tif any((0 <= y + dy[i] < H and 0 <= x + dx[i] < W and (S[y + dy[i]][x + dx[i]] == '#') for i in range(4))):\n\t\t\tcontinue\n\t\tprint('No')\n\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nhw = [['.'] * (W + 2)] + [['.'] + list(input()) + ['.'] for _ in range(H)] + [['.'] * (W + 2)]\nans = 'Yes'\nh = 1\nwhile h <= H:\n\tw = 1\n\twhile w <= W:\n\t\tif hw[h][w] == '#':\n\t\t\tif all([hw[h - 1][w] == '.', hw[h + 1][w] == '.', hw[h][w - 1] == '.', hw[h][w + 1] == '.']):\n\t\t\t\tans = 'No'\n\t\tw += 1\n\th += 1\nprint(ans)\n", "(h, w) = list(map(int, input().split()))\nS = [input() for i in range(h)]\nfor (i, T) in enumerate(S):\n\tfor (j, t) in enumerate(T):\n\t\tif t == '#':\n\t\t\tflag = 0\n\t\t\tif j > 0:\n\t\t\t\tif T[j - 1] == '#':\n\t\t\t\t\tflag += 1\n\t\t\tif j < w - 1:\n\t\t\t\tif T[j + 1] == '#':\n\t\t\t\t\tflag += 1\n\t\t\tif i > 0:\n\t\t\t\tif S[i - 1][j] == '#':\n\t\t\t\t\tflag += 1\n\t\t\tif i < h - 1:\n\t\t\t\tif S[i + 1][j] == '#':\n\t\t\t\t\tflag += 1\n\t\t\tif flag == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ngrid = []\nans = 'Yes'\nfor _ in range(H):\n\tgrid_i = input().split()\n\tgrid.append(grid_i[0])\nfor i in range(H):\n\tfor j in range(W):\n\t\tif grid[i][j] == '#':\n\t\t\tX = 'NG'\n\t\t\tif i - 1 >= 0 and grid[i - 1][j] == '.' or i < 1:\n\t\t\t\tNone\n\t\t\telse:\n\t\t\t\tX = 'OK'\n\t\t\tif j - 1 >= 0 and grid[i][j - 1] == '.' or j < 1:\n\t\t\t\tNone\n\t\t\telse:\n\t\t\t\tX = 'OK'\n\t\t\tif i + 1 < H and grid[i + 1][j] == '.' or i + 1 >= H:\n\t\t\t\tNone\n\t\t\telse:\n\t\t\t\tX = 'OK'\n\t\t\tif j + 1 < W and grid[i][j + 1] == '.' or j + 1 >= W:\n\t\t\t\tNone\n\t\t\telse:\n\t\t\t\tX = 'OK'\n\t\t\tif X == 'NG':\n\t\t\t\tans = 'No'\nprint(ans)\n", "(H, W) = list(map(int, input().split()))\nGrid = [['.'] * (W + 2)]\nfor i in range(H):\n\tGrid.append(list('.' + str(input()) + '.'))\nGrid.append(['.'] * (W + 2))\nfor k in range(1, H + 1):\n\tfor l in range(1, W + 1):\n\t\tmoji = Grid[k][l]\n\t\tif moji == '#':\n\t\t\tflg = 0\n\t\t\tfor (rec, col) in ((1, 0), (0, 1), (-1, 0), (0, -1)):\n\t\t\t\tif Grid[k + rec][l + col] == '#':\n\t\t\t\t\tGrid[k + rec][l + col] = 'b'\n\t\t\t\t\tflg = 1\n\t\t\t\telif Grid[k + rec][l + col] == 'b':\n\t\t\t\t\tflg = 1\n\t\t\tif flg == 1:\n\t\t\t\tGrid[k][l] = 'b'\n\t\t\telse:\n\t\t\t\tbreak\n\telse:\n\t\tcontinue\n\tprint('No')\n\tbreak\nelse:\n\tprint('Yes')\n", "import sys\n(H, W) = map(int, input().split())\nX = ['.' * (W + 2)]\nfor _ in range(H):\n\tX.append('.' + input().strip() + '.')\nX += ['.' * (W + 2)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif X[i][j] == '#' and '#' not in [X[i + 1][j], X[i - 1][j], X[i][j - 1], X[i][j + 1]]:\n\t\t\tprint('No')\n\t\t\tsys.exit()\nprint('Yes')\n", "(h, w) = (int(i) for i in input().split())\ns = ['.' * (w + 2)] + ['.' + input() + '.' for i in range(h)] + ['.' * (w + 2)]\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#':\n\t\t\ttonari = [s[i][j + 1], s[i][j - 1], s[i + 1][j], s[i - 1][j]]\n\t\t\tif not any((i == '#' for i in tonari)):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\ns = []\nfor i in range(h):\n\tli = input()\n\ts.append(li)\n\ndef check(s, x, y, w, h):\n\tdx = [0, 0, -1, 1]\n\tdy = [1, -1, 0, 0]\n\tfor i in range(4):\n\t\t(ny, nx) = (y + dy[i], x + dx[i])\n\t\tif 0 <= nx < w and 0 <= ny < h:\n\t\t\tif s[ny][nx] == '#':\n\t\t\t\treturn True\n\treturn False\nok = True\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tok = check(s, j, i, w, h)\n\t\t\tif not ok:\n\t\t\t\tbreak\n\tif not ok:\n\t\tbreak\nif ok or (w == 1 and h == 1):\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = map(int, input().split())\na = ['.' * (w + 2)]\ns = ['.' + input() + '.' for _ in range(h)]\ns = a + s + a\nf = True\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif s[i][j] == '#' and s[i][j - 1] == '.' and (s[i][j + 1] == '.') and (s[i - 1][j] == '.') and (s[i + 1][j] == '.'):\n\t\t\tf = False\nif f:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "(h, w) = [int(i) for i in input().split()]\ns = [list(input()) for _ in range(h)]\nflg = True\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif s[i][j] == '#' and s[i - 1][j] == s[i + 1][j] == s[i][j - 1] == s[i][j + 1] == '.':\n\t\t\tflg = False\nprint('Yes' if flg else 'No')\n", "(h, w) = map(int, input().split())\na = [0] * (h + 2)\na[0] = '.' * (w + 2)\na[h + 1] = a[0]\nfor _ in range(1, h + 1):\n\tj = input()\n\ta[_] = '.' + j + '.'\nx = 'Yes'\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif a[i][j] == '#':\n\t\t\tif a[i - 1][j] == '.' and a[i + 1][j] == '.' and (a[i][j - 1] == '.') and (a[i][j + 1] == '.'):\n\t\t\t\tx = 'No'\n\t\t\t\tbreak\nprint(x)\n", "(h, w) = map(int, input().split())\na = [0] * (w + 2)\nm = [a]\nans = 'Yes'\nfor i in range(h):\n\ts = input()\n\tm.append([0] + [1 if x == '#' else 0 for x in s] + [0])\nm.append(a)\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif m[i][j] == 1 and sum(m[i][j - 1:j + 2], m[i - 1][j] + m[i + 1][j]) == 1:\n\t\t\tans = 'No'\nprint(ans)\n", "(h, w) = list(map(int, input().split()))\ns = [input() for _ in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tflag = False\n\t\t\tfor (i_new, j_new) in [(i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)]:\n\t\t\t\tif i_new < 0 or i_new >= h or j_new < 0 or (j_new >= w):\n\t\t\t\t\tcontinue\n\t\t\t\tif s[i_new][j_new] == '#':\n\t\t\t\t\tflag = True\n\t\t\t\t\tbreak\n\t\t\tif not flag:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nl = [input() for _ in range(h)]\ndx = [1, -1, 0, 0]\ndy = [0, 0, 1, -1]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif l[i][j] == '#':\n\t\t\tcnt = 0\n\t\t\tfor di in range(4):\n\t\t\t\ty = i + dx[di]\n\t\t\t\tx = j + dy[di]\n\t\t\t\tif x < 0 or y < 0 or x > w - 1 or (y > h - 1):\n\t\t\t\t\tcontinue\n\t\t\t\telif l[y][x] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif cnt == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "def mapt(fn, *args):\n\treturn tuple(map(fn, *args))\n\ndef Input():\n\treturn mapt(int, input().split(' '))\n\ndef check(i, j, data):\n\treturn any((data[x][y] == '#' for (x, y) in ((i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1))))\n\ndef main():\n\t(h, w) = Input()\n\ta = ['-' * (w + 2)]\n\tdata = a + ['-' + input() + '-' for _ in range(h)] + a\n\tans = True\n\tfor i in range(1, h + 1):\n\t\tfor j in range(1, w + 1):\n\t\t\tif data[i][j] == '#':\n\t\t\t\tif not check(i, j, data):\n\t\t\t\t\tans = False\n\tif ans:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\nmain()\n", "(H, W) = map(int, input().split())\nG = ['.' * (W + 2)]\nfor k in range(H):\n\tG.append('.' + input() + '.')\nG.append('.' * (W + 2))\nfor k in range(1, H + 1):\n\tfor l in range(1, W + 1):\n\t\tif G[k][l] == '#':\n\t\t\tif G[k + 1][l] == '.' and G[k - 1][l] == '.' and (G[k][l - 1] == '.') and (G[k][l + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit(0)\nprint('Yes')\n", "import sys\n(H, W) = list(map(int, input().split()))\nS = [list(sys.stdin.readline().strip()) for _ in range(H)]\ndx = [1, 0, -1, 0]\ndy = [0, -1, 0, 1]\nfor (i, row) in enumerate(S):\n\tfor (j, s) in enumerate(row):\n\t\tif s == '.':\n\t\t\tcontinue\n\t\tok = False\n\t\tfor k in range(4):\n\t\t\tnx = j + dx[k]\n\t\t\tny = i + dy[k]\n\t\t\tif not (0 <= nx < W and 0 <= ny < H):\n\t\t\t\tcontinue\n\t\t\tif S[ny][nx] == '#':\n\t\t\t\tok = True\n\t\tif ok is False:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ncam = [input() for i in range(H)]\nans = 'Yes'\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif cam[i][j] == '#':\n\t\t\tif cam[i - 1][j] == cam[i + 1][j] == cam[i][j - 1] == cam[i][j + 1] == '.':\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\nprint(ans)\n", "(h, w) = map(int, input().split())\nsrc = [input() for i in range(h)]\nans = []\nfor row in src:\n\tans.append(list(row))\ndxy = [(1, 0), (-1, 0), (0, 1), (0, -1)]\nfor x in range(h):\n\tfor y in range(w):\n\t\tif src[x][y] == '.':\n\t\t\tcontinue\n\t\tif src[x][y] == '#':\n\t\t\tflag = 0\n\t\t\tfor (dx, dy) in dxy:\n\t\t\t\tif x + dx < 0 or x + dx > h - 1 or y + dy < 0 or (y + dy > w - 1):\n\t\t\t\t\tcontinue\n\t\t\t\tif src[x + dx][y + dy] == '#':\n\t\t\t\t\tflag = 1\n\t\t\t\t\tbreak\n\t\t\tif flag == 0:\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [['.'] * (W + 2)]\nfor i in range(H):\n\tS.append(list('.' + input().rstrip() + '.'))\nS.append(['.'] * (W + 2))\n\ndef checkaround(i, j):\n\tdirc = [[0, 1], [-1, 0], [0, -1], [1, 0]]\n\tfor d in dirc:\n\t\tif S[i - d[0]][j - d[1]] == '#':\n\t\t\treturn True\n\treturn False\n\ndef main():\n\tfor i in range(1, H + 1):\n\t\tfor j in range(1, W + 1):\n\t\t\tif S[i][j] == '#':\n\t\t\t\tif not checkaround(i, j):\n\t\t\t\t\tprint('No')\n\t\t\t\t\treturn\n\tprint('Yes')\nmain()\n", "(h, w) = map(int, input().split())\nc = []\nc.append('.' * (w + 2))\nfor i in range(h):\n\tc.append('.{}.'.format(input()))\nc.append('.' * (w + 2))\nfor i in range(1, h + 1):\n\tfor j in range(1, w + 1):\n\t\tif c[i][j] == '#' and c[i - 1][j] == c[i][j - 1] == c[i + 1][j] == c[i][j + 1] == '.':\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [input() for _ in range(H)]\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i][j] == '#':\n\t\t\tfor (ni, nj) in ((i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)):\n\t\t\t\tif 0 <= ni < H and 0 <= nj < W and (S[ni][nj] == '#'):\n\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nS = [list(input()) for i in range(H)]\nfor h in range(H):\n\tfor w in range(W):\n\t\tif S[h][w] in ['.', 'B']:\n\t\t\tcontinue\n\t\tary = [[0, 1], [0, -1], [1, 0], [-1, 0]]\n\t\tflag = False\n\t\tfor (x, y) in ary:\n\t\t\txd = h + x\n\t\t\tyd = w + y\n\t\t\tif xd < 0 or xd >= H or yd < 0 or (yd >= W):\n\t\t\t\tcontinue\n\t\t\tif S[xd][yd] in ['B', '#']:\n\t\t\t\tS[h][w] = 'B'\n\t\t\t\tS[xd][yd] = 'B'\n\t\t\t\tflag = True\n\t\tif not flag:\n\t\t\tprint('No')\n\t\t\treturn\nprint('Yes')\n", "(H, W) = map(int, input().split())\ngraph = []\nfor _ in range(H):\n\tgraph.append(list(input()))\nres = True\nfor j in range(1, W - 1):\n\tfor i in range(1, H - 1):\n\t\tif graph[i][j] == '#' and graph[i + 1][j] == '.' and (graph[i - 1][j] == '.') and (graph[i][j + 1] == '.') and (graph[i][j - 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\noriginal = [list(input()) for _ in range(h)]\nfor i in range(h - 1):\n\tfor j in range(w - 1):\n\t\tif original[i][j] == '#' and original[i - 1][j] != '#' and (original[i + 1][j] != '#') and (original[i][j - 1] != '#') and (original[i][j + 1] != '#'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nmatrix = []\nfor i in range(H):\n\tmatrix.append(list(input()))\nfor h in range(1, H - 1):\n\tfor w in range(1, W - 1):\n\t\tif matrix[h][w] == '#':\n\t\t\tif matrix[h - 1][w] == '.' and matrix[h][w - 1] == '.' and (matrix[h + 1][w] == '.') and (matrix[h][w + 1] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nList = [list(input()) for i in range(H)]\nres = 'Yes'\nflag = True\n\ndef checkAround(ListX, i, j):\n\tif i == 0 and j == 0:\n\t\tif List[i + 1][j] == '#' or List[i][j + 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i == 0 and j != 0 and (j != W - 1):\n\t\tif List[i + 1][j] == '#' or List[i][j - 1] == '#' or List[i][j + 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i == 0 and j == W - 1:\n\t\tif List[i + 1][j] == '#' or List[i][j - 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i != 0 and i != H - 1 and (j == 0):\n\t\tif List[i + 1][j] == '#' or List[i - 1][j] == '#' or List[i][j + 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i == H - 1 and j == W - 1:\n\t\tif List[i - 1][j] == '#' or List[i][j - 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i == H - 1 and j != 0 and (j != W - 1):\n\t\tif List[i - 1][j] == '#' or List[i][j + 1] == '#' or List[i][j - 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i == H - 1 and j == 0:\n\t\tif List[i - 1][j] == '#' or List[i][j - 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif i != 0 and i != H - 1 and (j == W - 1):\n\t\tif List[i + 1][j] == '#' or List[i - 1][j] == '#' or List[i][j - 1] == '#':\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False\n\telif List[i + 1][j] == '#' or List[i - 1][j] == '#' or List[i][j - 1] == '#' or (List[i][j + 1] == '#'):\n\t\treturn True\n\telse:\n\t\treturn False\nfor k in range(H):\n\tfor l in range(W):\n\t\tif List[k][l] == '.':\n\t\t\tpass\n\t\telse:\n\t\t\tflag = checkAround(List, k, l)\n\t\t\tif not flag:\n\t\t\t\tres = 'No'\n\t\t\t\tbreak\n\tif not flag:\n\t\tbreak\nprint(res)\n", "(H, W) = map(int, input().split())\nG = [list('.' * (W + 2)) for _ in range(H + 2)]\nfor i in range(H):\n\tG[i + 1][1:W + 1] = input()\nans = 'Yes'\nfor i in range(1, H):\n\tfor j in range(1, W):\n\t\tif G[i][j] == '#':\n\t\t\tif G[i - 1][j] == '.' and G[i + 1][j] == '.' and (G[i][j - 1] == '.') and (G[i][j + 1] == '.'):\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\nprint(ans)\n", "(h, w) = list(map(int, input().split()))\nmasu = []\nmasu.append([])\nfor i in range(w + 2):\n\tmasu[0].append('.')\nfor i in range(h):\n\tmasu.append([])\n\tmasu[i + 1].append('.')\n\tyoko = input()\n\tfor j in range(w):\n\t\tmasu[i + 1].append(yoko[j])\nfor i in range(w + 2):\n\tmasu[0].append('.')\nfor i in range(1, h - 1):\n\tfor j in range(1, w - 1):\n\t\tif masu[i][j] == '#':\n\t\t\tif masu[i][j + 1] == '.' and masu[i][j - 1] == '.' and (masu[i + 1][j] == '.') and (masu[i - 1][j] == '.'):\n\t\t\t\tprint('No')\n\t\t\t\treturn\nprint('Yes')\n", "(h, w) = map(int, input().split())\nb = '.'\nj = [b + b * w + b]\ns = j + [b + input() + b for _ in [0] * h] + j\nfor i in range(1, h + 1):\n\td = [n + 1 for n in range(w) if s[i][n:n + 3] == '.#.']\n\tif d and any([s[i - 1][c] == s[i + 1][c] == b for c in d]):\n\t\tprint('No')\n\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\ng = ['.' + input() + '.' for _ in range(H)]\ng = ['.' * (W + 2)] + g + ['.' * (W + 2)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif g[i][j] == '#' and g[i - 1][j] == '.' and (g[i][j + 1] == '.') and (g[i + 1][j] == '.') and (g[i][j - 1] == '.'):\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(H, W) = map(int, input().split())\nC = ['.' * (W + 2)] + ['.' + input() + '.' for _ in [0] * H] + ['.' * (W + 2)]\nfor i in range(1, H + 1):\n\tfor j in range(1, W + 1):\n\t\tif C[i][j] == '#' and '#' not in [C[i - 1][j], C[i][j - 1], C[i][j + 1], C[i + 1][j]]:\n\t\t\tprint('No')\n\t\t\texit()\nprint('Yes')\n", "(h, w) = map(int, input().split())\na = ['.' * (w + 2)]\nfor i in range(h):\n\tx = input()\n\ta.append('.' + x + '.')\na.append('.' * (w + 2))\nfor i in range(h):\n\tfor j in range(w):\n\t\tif a[i + 1][j + 1] == '#':\n\t\t\tif a[i][j + 1] == '#' or a[i + 2][j + 1] == '#' or a[i + 1][j + 2] == '#' or (a[i + 1][j] == '#'):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "from sys import stdin, stdout\n\ndef solve():\n\t(h, w) = list(map(int, input().split()))\n\tgrid = []\n\tfor _ in range(h):\n\t\ts = input()\n\t\tassert len(s) == w\n\t\tgrid.append(s)\n\tfor i in range(h):\n\t\tfor j in range(w):\n\t\t\tif grid[i][j] == '.':\n\t\t\t\tcontinue\n\t\t\tisolate = True\n\t\t\tfor px in [i - 1, i + 1]:\n\t\t\t\tif px >= 0 and px < h:\n\t\t\t\t\tif grid[px][j] == '#':\n\t\t\t\t\t\tisolate = False\n\t\t\tfor py in [j - 1, j + 1]:\n\t\t\t\tif py >= 0 and py < w:\n\t\t\t\t\tif grid[i][py] == '#':\n\t\t\t\t\t\tisolate = False\n\t\t\tif isolate:\n\t\t\t\tprint('No')\n\t\t\t\treturn\n\tprint('Yes')\n\ndef main():\n\tsolve()\n\ndef __starting_point():\n\tmain()\n__starting_point()\n", "(H, W) = map(int, input().split())\nS = [input() for _ in range(H)]\nans = 'Yes'\nfor i in range(H):\n\tfor j in range(W):\n\t\tif S[i][j] == '#':\n\t\t\tif S[max(0, i - 1)][j] != '#' and S[min(i + 1, H - 1)][j] != '#' and (S[i][max(0, j - 1)] != '#') and (S[i][min(j + 1, W - 1)] != '#'):\n\t\t\t\tans = 'No'\n\t\t\t\tbreak\nprint(ans)\n", "(H, W) = map(int, input().split())\ns = []\nans = 'Yes'\nfor _ in range(H):\n\ts.append(input())\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif s[i][j] == '#' and s[i][j + 1] == s[i + 1][j] == s[i][j - 1] == s[i - 1][j] == '.':\n\t\t\tprint('No')\n\t\t\treturn\nprint(ans)\n", "(h, w) = map(int, input().split())\nL = [list(input()) for i in range(h)]\nfor i in range(h):\n\tfor j in range(w):\n\t\tif L[i][j] == '#':\n\t\t\tif L[i][max(j - 1, 0)] != '#' and L[i][min(j + 1, w - 1)] != '#' and (L[max(i - 1, 0)][j] != '#') and (L[min(i + 1, h - 1)][j] != '#'):\n\t\t\t\tprint('No')\n\t\t\t\texit()\nprint('Yes')\n", "(h, w) = list(map(int, input().split()))\ns = [input() for _ in range(h)]\ndh = [0, 1, 0, -1]\ndw = [1, 0, -1, 0]\nflag = 0\nfor i in range(h):\n\tfor j in range(w):\n\t\tif s[i][j] == '#':\n\t\t\tcnt = 0\n\t\t\tfor p in range(4):\n\t\t\t\tif i + dh[p] < 0 or i + dh[p] >= h or j + dw[p] < 0 or (j + dw[p] >= w):\n\t\t\t\t\tcontinue\n\t\t\t\telif s[i + dh[p]][j + dw[p]] == '#':\n\t\t\t\t\tcnt += 1\n\t\t\tif cnt == 0:\n\t\t\t\tflag = 1\n\t\t\t\tbreak\n\t\tif flag == 1:\n\t\t\tbreak\n\tif flag == 1:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = list(map(int, input().split()))\ns = [input() for _ in range(H)]\ncells = [(i, j) for i in range(H) for j in range(W)]\ndi = [1, 0, -1, 0]\ndj = [0, 1, 0, -1]\nfor (i, j) in cells:\n\tif s[i][j] == '.':\n\t\tcontinue\n\tflag = False\n\tfor k in range(4):\n\t\tni = i + di[k]\n\t\tnj = j + dj[k]\n\t\tif ni < 0 or nj < 0 or ni >= H or (nj >= W):\n\t\t\tcontinue\n\t\tif s[ni][nj] == '#':\n\t\t\tflag = True\n\tif not flag:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')\n", "(H, W) = map(int, input().split())\ncambas = []\nfor i in range(H):\n\tcambas.append(input())\nans = 'Yes'\nfor i in range(1, H - 1):\n\tfor j in range(1, W - 1):\n\t\tif cambas[i][j] == '#' and cambas[i][j + 1] == cambas[i + 1][j] == cambas[i - 1][j] == cambas[i][j - 1] == '.':\n\t\t\tans = 'No'\n\t\t\tbreak\nprint(ans)\n"]

difficulty: EASY

name: AtCoder Beginner Contest 096 - Grid Repainting 2

source: atcoder

time_limit: 2.0 seconds

memory_limit: 256.0 megabytes

raw_problem:
配点：<var>300</var> 点

問題文

<var>H</var> 行 <var>W</var> 列のマス目で表されるキャンバスがあります. 上から <var>i</var> 番目, 左から <var>j</var> 番目のマスを <var>(i, j)</var> と表します.

最初, すべてのマス目は白色です. square1001 君は, 黒い絵の具を使って絵を描きたいと思いました. 具体的には, square1001 君の目標は, <var>s_{i, j}=</var> # のときマス <var>(i, j)</var> を黒色, <var>s_{i, j}=</var> . のときマス <var>(i, j)</var> を白色にすることです.

しかし, 彼は絵を描くことが得意ではないので, 何回か (<var>0</var> 回でもよい)「上下左右に隣接する <var>2</var> つのマスを選び, 両方黒く塗る」ことしかできません. ただし, すでに黒く塗られているマスを選ぶこともでき, この場合マスの色は黒のまま変わりません.

square1001 君が目標を達成することができるか判定してください.

制約

<var>H</var> は <var>1</var> 以上 <var>50</var> 以下の整数

<var>W</var> は <var>1</var> 以上 <var>50</var> 以下の整数

すべての <var>(i, j) \ (1 \leq i \leq H, 1 \leq j \leq W)</var> に対して, <var>s_{i, j}</var> は # または .

入力

入力は以下の形式で標準入力から与えられる.

<var>H</var> <var>W</var>
<var>s_{1, 1} s_{1, 2} s_{1, 3} ... s_{1, W}</var>
<var>s_{2, 1} s_{2, 2} s_{2, 3} ... s_{2, W}</var>
  <var>:</var>   <var>:</var>
<var>s_{H, 1} s_{H, 2} s_{H, 3} ... s_{H, W}</var>

出力

square1001 君が目標を達成することができるならば Yes、達成できないならば No と出力しなさい.

入力例 1

3 3
.#.
###
.#.

出力例 1

Yes

目標を達成する手順の一例として, 下の図の方法が挙げられます. この図では, 「次に黒く塗るマス」を「☆」で表しています.

入力例 2

5 5
#.#.#
.#.#.
#.#.#
.#.#.
#.#.#

出力例 2

No

square1001 君は目標を達成することができません.

入力例 3

11 11
...#####...
.##.....##.
#..##.##..#
#..##.##..#
#.........#
#...###...#
.#########.
.#.#.#.#.#.
##.#.#.#.##
..##.#.##..
.##..#..##.

出力例 3

Yes

Score: <var>300</var> points

Problem Statement

We have a canvas divided into a grid with <var>H</var> rows and <var>W</var> columns. The square at the <var>i</var>-th row from the top and the <var>j</var>-th column from the left is represented as <var>(i, j)</var>.

Initially, all the squares are white. square1001 wants to draw a picture with black paint. His specific objective is to make Square <var>(i, j)</var> black when <var>s_{i, j}=</var> #, and to make Square <var>(i, j)</var> white when <var>s_{i, j}=</var> ..

However, since he is not a good painter, he can only choose two squares that are horizontally or vertically adjacent and paint those squares black, for some number of times (possibly zero). He may choose squares that are already painted black, in which case the color of those squares remain black.

Determine if square1001 can achieve his objective.

Constraints

<var>H</var> is an integer between <var>1</var> and <var>50</var> (inclusive).

<var>W</var> is an integer between <var>1</var> and <var>50</var> (inclusive).

For every <var>(i, j)</var> <var>(1 \leq i \leq H, 1 \leq j \leq W)</var>, <var>s_{i, j}</var> is # or ..

Input

Input is given from Standard Input in the following format:

<var>H</var> <var>W</var>
<var>s_{1, 1} s_{1, 2} s_{1, 3} ... s_{1, W}</var>
<var>s_{2, 1} s_{2, 2} s_{2, 3} ... s_{2, W}</var>
  <var>:</var>   <var>:</var>
<var>s_{H, 1} s_{H, 2} s_{H, 3} ... s_{H, W}</var>

Output

If square1001 can achieve his objective, print Yes; if he cannot, print No.

Sample Input 1

3 3
.#.
###
.#.

Sample Output 1

Yes

One possible way to achieve the objective is shown in the figure below. Here, the squares being painted are marked by stars.

Sample Input 2

5 5
#.#.#
.#.#.
#.#.#
.#.#.
#.#.#

Sample Output 2

No

square1001 cannot achieve his objective here.

Sample Input 3

11 11
...#####...
.##.....##.
#..##.##..#
#..##.##..#
#.........#
#...###...#
.#########.
.#.#.#.#.#.
##.#.#.#.##
..##.#.##..
.##..#..##.

Sample Output 3

Yes

question:
We have a canvas divided into a grid with $H$ rows and $W$ columns. The square at the $i$-th row from the top and the $j$-th column from the left is represented as $(i, j)$.
Initially, all the squares are white. square1001 wants to draw a picture with black paint. His specific objective is to make Square $(i, j)$ black when $s_{i, j}=$ #, and to make Square $(i, j)$ white when $s_{i, j}=$ ..
However, since he is not a good painter, he can only choose two squares that are horizontally or vertically adjacent and paint those squares black, for some number of times (possibly zero). He may choose squares that are already painted black, in which case the color of those squares remain black.
Determine if square1001 can achieve his objective.

Constraints

- $H$ is an integer between $1$ and $50$ (inclusive).
- $W$ is an integer between $1$ and $50$ (inclusive).
- For every $(i, j)$ $(1 \leq i \leq H, 1 \leq j \leq W)$, $s_{i, j}$ is # or ..

Input

Input is given from Standard Input in the following format:
$H$ $W$

$s_{1, 1} s_{1, 2} s_{1, 3} ... s_{1, W}$

$s_{2, 1} s_{2, 2} s_{2, 3} ... s_{2, W}$

$:$   $:$

$s_{H, 1} s_{H, 2} s_{H, 3} ... s_{H, W}$

Output

If square1001 can achieve his objective, print Yes; if he cannot, print No.

Sample Input 1
3 3
.#.
###
.#.

Sample Output 1
Yes

One possible way to achieve the objective is shown in the figure below. Here, the squares being painted are marked by stars.
![image](1.png)

Sample Input 2
5 5
#.#.#
.#.#.
#.#.#
.#.#.
#.#.#

Sample Output 2
No

square1001 cannot achieve his objective here.

Sample Input 3
11 11
...#####...
.##.....##.
#..##.##..#
#..##.##..#
#.........#
#...###...#
.#########.
.#.#.#.#.#.
##.#.#.#.##
..##.#.##..
.##..#..##.

Sample Output 3
Yes

data_split: test