Problem: One day Vasya got hold of a sheet of checkered paper n × m squares in size. Our Vasya adores geometrical figures, so he painted two rectangles on the paper. The rectangles' sides are parallel to the coordinates' axes, also the length of each side of each rectangle is no less than 3 squares and the sides are painted by the grid lines. The sides can also be part of the sheet of paper's edge. Then Vasya hatched all squares on the rectangles' frames.

Let's define a rectangle's frame as the set of squares inside the rectangle that share at least one side with its border.

A little later Vasya found a sheet of paper of exactly the same size and couldn't guess whether it is the same sheet of paper or a different one. So, he asked you to check whether the sheet of paper he had found contains two painted frames and nothing besides them.

Please note that the frames painted by Vasya can arbitrarily intersect, overlap or even completely coincide.

The coordinates on the sheet of paper are introduced in such a way that the X axis goes from top to bottom, the x coordinates of the squares' numbers take values from 1 to n and the Y axis goes from the left to the right and the y coordinates of the squares' numbers take values from 1 to m.

Input

The first input line contains two integers n and m (3 ≤ n, m ≤ 1000) — the sizes of the sheet of paper Vasya found. Next n lines, each consisting of m symbols "." (dot) and "#" (number sign), describe the found sheet of paper. The symbol "#" represents a hatched square and the symbol "." represents a non-hatched square.

Output

In the first line print the single word "YES" or "NO", meaning whether it is true that the found sheet of paper has two frames painted on it. If the answer is positive, then print in the second line 4 integers: the coordinates of the upper left and lower right corners of the first frame. In the third line print 4 integers: the coordinates of the upper left and the lower right corners of the second frame. If there are multiple answers, print any of them.

Examples

Input

4 5
#####
#.#.#
###.#
#####


Output

YES
1 1 3 3
1 1 4 5


Input

5 6
...###
...###
#####.
#...#.
#####.


Output

NO

Note

In the first sample there are two frames on the picture. The first one is:
    
    
    ###..  
    #.#..  
    ###..  
    .....  
    

The second one is:
    
    
    #####  
    #...#  
    #...#  
    #####  
    

In the second sample the painted figures are not frames. Note that the height and width of valid frames is no less than 3.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n, m, total;
char f[1005][1005];
int row[1005], col[1005];
int g[1005][1005];
int paint(int y1, int x1, int y2, int x2, int c) {
  int st = 0;
  for (int i = x1; i <= x2; i++) {
    if (g[y1][i] != c) {
      g[y1][i] = c;
      st++;
      if (c == 1 && f[y1][i] != '#') return -1;
    }
    if (g[y2][i] != c) {
      g[y2][i] = c;
      st++;
      if (c == 1 && f[y2][i] != '#') return -1;
    }
  }
  for (int i = y1; i <= y2; i++) {
    if (g[i][x1] != c) {
      g[i][x1] = c;
      st++;
      if (c == 1 && f[i][x1] != '#') return -1;
    }
    if (g[i][x2] != c) {
      g[i][x2] = c;
      st++;
      if (c == 1 && f[i][x2] != '#') return -1;
    }
  }
  return st;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%s", f[i]);
    for (int j = 0; j < m; j++)
      if (f[i][j] == '#') total++;
  }
  vector<pair<int, int> > c1;
  memset(row, 0, sizeof(row));
  memset(col, 0, sizeof(col));
  for (int i = 0; i + 2 < n; i++) {
    for (int j = 0; j + 2 < m; j++) {
      if (f[i][j] == '#' && f[i][j + 1] == '#' && f[i][j + 2] == '#' &&
          f[i + 1][j] == '#' && f[i + 2][j] == '#') {
        if (row[i] < 3 && col[j] < 3) {
          c1.push_back(make_pair(i, j));
          row[i]++;
          col[j]++;
        }
      }
    }
  }
  vector<pair<int, int> > c2;
  memset(row, 0, sizeof(row));
  memset(col, 0, sizeof(col));
  for (int i = n - 1; i >= 2; i--) {
    for (int j = m - 1; j >= 2; j--) {
      if (f[i][j] == '#' && f[i][j - 1] == '#' && f[i][j - 2] == '#' &&
          f[i - 1][j] == '#' && f[i - 2][j] == '#') {
        if (row[i] < 3 && col[j] < 3) {
          c2.push_back(make_pair(i, j));
          row[i]++;
          col[j]++;
        }
      }
    }
  }
  if (c1.size() * c2.size() > 100) {
    printf("NO\n");
    return 0;
  }
  for (int i1 = 0; i1 < c1.size(); i1++)
    for (int j1 = 0; j1 < c2.size(); j1++) {
      if (c2[j1].first - c1[i1].first < 2 || c2[j1].second - c1[i1].second < 2)
        continue;
      for (int i2 = 0; i2 < c2.size(); i2++)
        for (int j2 = 0; j2 < c2.size(); j2++) {
          if (c2[j2].first - c1[i2].first < 2 ||
              c2[j2].second - c1[i2].second < 2)
            continue;
          int p1 = paint(c1[i1].first, c1[i1].second, c2[j1].first,
                         c2[j1].second, 1);
          int p2 = paint(c1[i2].first, c1[i2].second, c2[j2].first,
                         c2[j2].second, 1);
          if (p1 != -1 && p2 != -1 && p1 + p2 == total) {
            printf("YES\n");
            printf("%d %d %d %d\n", c1[i1].first + 1, c1[i1].second + 1,
                   c2[j1].first + 1, c2[j1].second + 1);
            printf("%d %d %d %d\n", c1[i2].first + 1, c1[i2].second + 1,
                   c2[j2].first + 1, c2[j2].second + 1);
            return 0;
          }
          paint(c1[i1].first, c1[i1].second, c2[j1].first, c2[j1].second, 0);
          paint(c1[i2].first, c1[i2].second, c2[j2].first, c2[j2].second, 0);
        }
    }
  printf("NO\n");
  return 0;
}