#include <bits/stdc++.h>   using namespace std;   const int maxn = 1010;   set<int> X, Y;   int n, m;   char st[maxn][maxn], sz[maxn][maxn];   bool fill(int x1, int y1, int x2, int y2) {     int i;     for (i = x1; i <= x2; ++i) {       if (st[i][y1] ==  . ) return 0;       if (st[i][y2] ==  . ) return 0;       sz[i][y1] = sz[i][y2] =  # ;     }     for (i = y1; i <= y2; ++i) {       if (st[x1][i] ==  . ) return 0;       if (st[x2][i] ==  . ) return 0;       sz[x1][i] = sz[x2][i] =  # ;     }     return true;   }   int main() {     int i, j;     scanf( %d %d n , &n, &m);     for (i = 1; i <= n; ++i) scanf( %s , st[i] + 1);     for (i = 1; i <= n; ++i)       for (j = 1; j <= m; ++j) {         if (st[i][j - 1] ==  #  && st[i][j] ==  #  && st[i][j + 1] ==  # )           X.insert(i);         if (st[i - 1][j] ==  #  && st[i][j] ==  #  && st[i + 1][j] ==  # )           Y.insert(j);       }     if (X.size() > 4) X.erase(++ ++X.begin(), -- --X.end());     if (Y.size() > 4) Y.erase(++ ++Y.begin(), -- --Y.end());     for (set<int>::iterator x1 = X.begin(); x1 != X.end(); ++x1)       for (set<int>::iterator x2 = X.begin(); x2 != X.end(); ++x2)         for (set<int>::iterator x3 = X.begin(); x3 != X.end(); ++x3)           for (set<int>::iterator x4 = X.begin(); x4 != X.end(); ++x4)             for (set<int>::iterator y1 = Y.begin(); y1 != Y.end(); ++y1)               for (set<int>::iterator y2 = Y.begin(); y2 != Y.end(); ++y2)                 for (set<int>::iterator y3 = Y.begin(); y3 != Y.end(); ++y3)                   for (set<int>::iterator y4 = Y.begin(); y4 != Y.end(); ++y4)                     if (*x1 + 1 < *x2 && *x3 + 1 < *x4 && *y1 + 1 < *y2 &&                         *y3 + 1 < *y4) {                       memset(sz,  . , sizeof(sz));                       if (fill(*x1, *y1, *x2, *y2) && fill(*x3, *y3, *x4, *y4)) {                         bool ok = true;                         for (i = 1; i <= n; ++i)                           for (j = 1; j <= m; ++j)                             if (st[i][j] != sz[i][j]) ok = false;                         if (ok) {                           printf( YES n );                           printf( %d %d %d %d n , *x1, *y1, *x2, *y2);                           printf( %d %d %d %d n , *x3, *y3, *x4, *y4);                           return 0;                         }                       }                     }     printf( NO n );     return 0;   }   