#include <bits/stdc++.h>
using namespace std;
int n, m;
bool debug = false;
int k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
char s[1005][1005], g[1005][1005];
set<int> v, h;
void reset() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) g[i][j] = '.';
}
bool ff(int l, int r, int u, int d) {
  for (int i = l; i <= r; i++) {
    if (s[i][u] == '.' || s[i][d] == '.') return 0;
    g[i][u] = '#';
    g[i][d] = '#';
  }
  for (int i = u; i <= d; i++) {
    if (s[l][i] == '.' || s[r][i] == '.') return 0;
    g[l][i] = '#';
    g[r][i] = '#';
  }
  return 1;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '#' && s[i][j - 1] == '#' && s[i][j + 1] == '#') {
        v.insert(i);
      }
      if (s[i][j] == '#' && s[i - 1][j] == '#' && s[i + 1][j] == '#') {
        h.insert(j);
      }
    }
  }
  if (v.size() > 4) v.erase(++ ++v.begin(), -- --v.end());
  if (h.size() > 4) h.erase(++ ++h.begin(), -- --h.end());
  for (int va : v)
    for (int vb : v)
      for (int ha : h)
        for (int hb : h)
          for (int vA : v)
            for (int vB : v)
              for (int hA : h)
                for (int hB : h) {
                  if (vb - va > 1 && hb - ha > 1 && vB - vA > 1 &&
                      hB - hA > 1) {
                    reset();
                    if (ff(va, vb, ha, hb) && ff(vA, vB, hA, hB) &&
                        memcmp(s, g, sizeof s) == 0) {
                      puts("YES");
                      printf("%d %d %d %d\n", va, ha, vb, hb);
                      printf("%d %d %d %d\n", vA, hA, vB, hB);
                      return 0;
                    }
                  }
                }
  puts("NO");
  return 0;
}
