#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  cin >> m;
  string *map = new string[n + 2];
  map[0] = string(m + 2, '.');
  map[n + 1] = string(m + 2, '.');
  string ms;
  for (int i = 0; i < n; i++) {
    cin >> ms;
    map[i + 1] = '.' + ms + '.';
  }
  vector<pair<int, int> > ps;
  int v, h;
  int sum;
  for (int i = 0; i < n + 1; i++)
    for (int j = 0; j < m + 1; j++) {
      if ((map[i][j] == '#')) {
        if ((map[i + 1][j] == '#') && (map[i - 1][j] == '#') &&
            (map[i][j + 1] == '.') && (map[i][j - 1] == '.'))
          continue;
        if ((map[i + 1][j] == '.') && (map[i - 1][j] == '.') &&
            (map[i][j + 1] == '#') && (map[i][j - 1] == '#'))
          continue;
        pair<int, int> p = make_pair(i, j);
        v = ((p.first > 2)
                 ? (((((map[p.first - 1][p.second] == '#') ? 1 : 0) +
                      ((map[p.first - 2][p.second] == '#') ? 1 : 0)) == 2)
                        ? 1
                        : 0)
                 : 0) +
            ((p.first < n - 1)
                 ? (((((map[p.first + 1][p.second] == '#') ? 1 : 0) +
                      ((map[p.first + 2][p.second] == '#') ? 1 : 0)) == 2)
                        ? 1
                        : 0)
                 : 0);
        h = ((p.second > 2)
                 ? (((((map[p.first][p.second - 1] == '#') ? 1 : 0) +
                      ((map[p.first][p.second - 2] == '#') ? 1 : 0)) == 2)
                        ? 1
                        : 0)
                 : 0) +
            ((p.second < m - 1)
                 ? (((((map[p.first][p.second + 1] == '#') ? 1 : 0) +
                      ((map[p.first][p.second + 2] == '#') ? 1 : 0)) == 2)
                        ? 1
                        : 0)
                 : 0);
        if (v == 0 || h == 0) continue;
        sum = 0;
        for (int i1 = -1; i1 < 2; i1++)
          for (int j1 = -1; j1 < 2; j1++)
            sum += ((map[i + i1][j + j1] == '#') ? 1 : 0);
        if (sum >= 6 && v + h > 2) continue;
        ps.push_back(make_pair(i, j));
      }
    }
  int a[8];
  int all_len;
  bool is_cor;
  for (int a1 = 0; a1 < ps.size(); a1++) {
    for (int a2 = 0; a2 < ps.size(); a2++) {
      if (!((ps[a1].first == ps[a2].first) &&
            (ps[a1].second < ps[a2].second - 1)))
        continue;
      for (int a3 = 0; a3 < ps.size(); a3++) {
        if (!((ps[a2].first < ps[a3].first - 1) &&
              (ps[a2].second == ps[a3].second)))
          continue;
        for (int a4 = 0; a4 < ps.size(); a4++) {
          if (!((ps[a3].first == ps[a4].first) &&
                (ps[a3].second - 1 > ps[a4].second)))
            continue;
          if (!((ps[a4].first - 1 > ps[a1].first) &&
                (ps[a4].second == ps[a1].second)))
            continue;
          for (int b1 = 0; b1 < ps.size(); b1++) {
            for (int b2 = 0; b2 < ps.size(); b2++) {
              if (!((ps[b1].first == ps[b2].first) &&
                    (ps[b1].second < ps[b2].second - 1)))
                continue;
              for (int b3 = 0; b3 < ps.size(); b3++) {
                if (!((ps[b2].first < ps[b3].first - 1) &&
                      (ps[b2].second == ps[b3].second)))
                  continue;
                for (int b4 = 0; b4 < ps.size(); b4++) {
                  if (!((ps[b3].first == ps[b4].first) &&
                        (ps[b3].second - 1 > ps[b4].second)))
                    continue;
                  if (!((ps[b4].first - 1 > ps[b1].first) &&
                        (ps[b4].second == ps[b1].second)))
                    continue;
                  all_len = (((ps[a1].first - ps[a2].first >= 0)
                                  ? ps[a1].first - ps[a2].first
                                  : -ps[a1].first - ps[a2].first) +
                             1) *
                                (((ps[a1].second - ps[a2].second >= 0)
                                      ? ps[a1].second - ps[a2].second
                                      : -ps[a1].second - ps[a2].second) +
                                 1) +
                            (((ps[a2].first - ps[a3].first >= 0)
                                  ? ps[a2].first - ps[a3].first
                                  : -ps[a2].first - ps[a3].first) +
                             1) *
                                (((ps[a2].second - ps[a3].second >= 0)
                                      ? ps[a2].second - ps[a3].second
                                      : -ps[a2].second - ps[a3].second) +
                                 1) +
                            (((ps[a4].first - ps[a3].first >= 0)
                                  ? ps[a4].first - ps[a3].first
                                  : -ps[a4].first - ps[a3].first) +
                             1) *
                                (((ps[a4].second - ps[a3].second >= 0)
                                      ? ps[a4].second - ps[a3].second
                                      : -ps[a4].second - ps[a3].second) +
                                 1) +
                            (((ps[a1].first - ps[a4].first >= 0)
                                  ? ps[a1].first - ps[a4].first
                                  : -ps[a1].first - ps[a4].first) +
                             1) *
                                (((ps[a1].second - ps[a4].second >= 0)
                                      ? ps[a1].second - ps[a4].second
                                      : -ps[a1].second - ps[a4].second) +
                                 1);
                  all_len += (((ps[b1].first - ps[b2].first >= 0)
                                   ? ps[b1].first - ps[b2].first
                                   : -ps[b1].first - ps[b2].first) +
                              1) *
                                 (((ps[b1].second - ps[b2].second >= 0)
                                       ? ps[b1].second - ps[b2].second
                                       : -ps[b1].second - ps[b2].second) +
                                  1) +
                             (((ps[b2].first - ps[b3].first >= 0)
                                   ? ps[b2].first - ps[b3].first
                                   : -ps[b2].first - ps[b3].first) +
                              1) *
                                 (((ps[b2].second - ps[b3].second >= 0)
                                       ? ps[b2].second - ps[b3].second
                                       : -ps[b2].second - ps[b3].second) +
                                  1) +
                             (((ps[b4].first - ps[b3].first >= 0)
                                   ? ps[b4].first - ps[b3].first
                                   : -ps[b4].first - ps[b3].first) +
                              1) *
                                 (((ps[b4].second - ps[b3].second >= 0)
                                       ? ps[b4].second - ps[b3].second
                                       : -ps[b4].second - ps[b3].second) +
                                  1) +
                             (((ps[b1].first - ps[b4].first >= 0)
                                   ? ps[b1].first - ps[b4].first
                                   : -ps[b1].first - ps[b4].first) +
                              1) *
                                 (((ps[b1].second - ps[b4].second >= 0)
                                       ? ps[b1].second - ps[b4].second
                                       : -ps[b1].second - ps[b4].second) +
                                  1);
                  if (all_len < ps.size()) continue;
                  string *tmap = new string[n + 2];
                  for (int i = 0; i < n + 2; i++) tmap[i] = map[i];
                  is_cor = true;
                  for (int mx = ps[a1].first; mx < ps[a2].first + 1; mx++)
                    for (int my = ps[a1].second; my < ps[a2].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[a2].first; mx < ps[a3].first + 1; mx++)
                    for (int my = ps[a2].second; my < ps[a3].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[a4].first; mx < ps[a3].first + 1; mx++)
                    for (int my = ps[a4].second; my < ps[a3].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[a1].first; mx < ps[a4].first + 1; mx++)
                    for (int my = ps[a1].second; my < ps[a4].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[b1].first; mx < ps[b2].first + 1; mx++)
                    for (int my = ps[b1].second; my < ps[b2].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[b2].first; mx < ps[b3].first + 1; mx++)
                    for (int my = ps[b2].second; my < ps[b3].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[b4].first; mx < ps[b3].first + 1; mx++)
                    for (int my = ps[b4].second; my < ps[b3].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int mx = ps[b1].first; mx < ps[b4].first + 1; mx++)
                    for (int my = ps[b1].second; my < ps[b4].second + 1; my++)
                      if (map[mx][my] != '#')
                        is_cor = false;
                      else
                        tmap[mx][my] = '.';
                  for (int i = 0; i < n + 2; i++)
                    for (int j = 0; j < m + 2; j++)
                      if (tmap[i][j] == '#') is_cor = false;
                  if (is_cor) {
                    cout << "YES" << endl;
                    cout << ps[a1].first << " " << ps[a1].second << " "
                         << ps[a3].first << " " << ps[a3].second << endl;
                    cout << ps[b1].first << " " << ps[b1].second << " "
                         << ps[b3].first << " " << ps[b3].second << endl;
                    return 0;
                  }
                  delete[] tmap;
                }
              }
            }
          }
        }
      }
    }
  }
  cout << "NO" << endl;
}
