#include <bits/stdc++.h>
using namespace std;
pair<int, int> point1[2005], point[2005];
int dy[6][2] = {{0, 0}, {0, 0}, {1, 0}, {2, 0}, {0, 1}, {0, 2}}, sum, sum1;
int cnt = 0, cnt1 = 0,
    dy1[6][2] = {{0, 0}, {0, 0}, {-1, 0}, {-2, 0}, {0, -1}, {0, -2}}, tot = 0;
int used[2005][2005];
char c[2005][2005];
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.first > b.first || (a.first == b.first && a.second > b.second);
}
int check(int a, int b) {
  if (point1[b].first - point[a].first < 2) return -0x3f3f3f;
  if (point1[b].second - point[a].second < 2) return -0x3f3f3f;
  int anss = 0;
  for (int i = point[a].first; i <= point1[b].first; i++) {
    if (c[i][point[a].second] == '.') return -0x3f3f3f;
    if (c[i][point1[b].second] == '.') return -0x3f3f3f;
    if (used[i][point[a].second] != tot) used[i][point[a].second] = tot, anss++;
    if (used[i][point1[b].second] != tot)
      used[i][point1[b].second] = tot, anss++;
  }
  for (int i = point[a].second; i <= point1[b].second; i++) {
    if (c[point[a].first][i] == '.') return -0x3f3f3f;
    if (c[point1[b].first][i] == '.') return -0x3f3f3f;
    if (used[point[a].first][i] != tot) used[point[a].first][i] = tot, anss++;
    if (used[point1[b].first][i] != tot) used[point1[b].first][i] = tot, anss++;
  }
  return anss;
}
void print(int a, int b) {
  printf("%d %d %d %d\n", point[a].first, point[a].second, point1[b].first,
         point1[b].second);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", c[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (c[i][j] == '#') sum++;
  int summ = 0;
  for (int i = 1; i <= n - 2; i++) {
    summ = 0;
    for (int j = 1; j <= m - 2; j++) {
      for (int k = 1; k <= 5; k++) {
        int nowx = i + dy[k][0], nowy = j + dy[k][1];
        if (c[nowx][nowy] == '.') goto syf;
      }
      summ++;
      point[++cnt] = make_pair(i, j);
    syf:
      i;
      if (summ >= 3) break;
    }
  }
  for (int i = 3; i <= n; i++) {
    summ = 0;
    for (int j = m; j >= 3; j--) {
      for (int k = 1; k <= 5; k++) {
        int nowx = i + dy1[k][0], nowy = j + dy1[k][1];
        if (c[nowx][nowy] == '.') goto syf1;
      }
      summ++;
      point1[++cnt1] = make_pair(i, j);
    syf1:
      i;
      if (summ >= 3) break;
    }
  }
  sort(point + 1, point + 1 + cnt);
  sort(point1 + 1, point1 + 1 + cnt1, cmp);
  for (int i = 1; i <= 6; i++)
    for (int j = 1; j <= 6; j++) {
      tot++;
      int k = check(i, j), k1 = check(1, 1);
      if (k + k1 == sum) {
        printf("YES\n");
        print(1, 1), print(i, j);
        exit(0);
      }
      tot++;
      k = check(1, j), k1 = check(i, 1);
      if (k + k1 == sum) {
        printf("YES\n");
        print(1, j), print(i, 1);
        exit(0);
      }
    }
  printf("NO\n");
  return 0;
}
