func_code_string: #include <bits/stdc++.h>   bool vis[1001][1001], ret[1001][1001];   const int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};   const int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};   int main() {     int n, m;     scanf( %d %d , &n, &m);     for (int i = 1; i <= n; ++i) {       scanf(  n );       for (int j = 1; j <= m; ++j) {         char ch = getchar();         if (ch ==  # ) vis[i][j] = 1;       }     }     for (int i = 2; i < n; ++i)       for (int j = 2; j < m; ++j) {         bool ok = true;         for (int k = 0; k < 8; ++k)           if (!vis[i + dx[k]][j + dy[k]]) {             ok = false;             break;           }         if (ok)           for (int k = 0; k < 8; ++k) ret[i + dx[k]][j + dy[k]] = true;       }     for (int i = 1; i <= n; ++i)       for (int j = 1; j <= m; ++j)         if (vis[i][j] != ret[i][j]) return printf( NO ), 0;     printf( YES );   }   