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>
typedef struct {
  int x1, y1, x2, y2;
} rect;
char a[1000][1001];
int cc;
int cover(rect r) {
  for (int x = r.x1; x <= r.x2; x++) {
    if (a[x][r.y1] == '.' || a[x][r.y2] == '.') return 0;
    if (a[x][r.y1] == '#') a[x][r.y1] = '%', cc++;
    if (a[x][r.y2] == '#') a[x][r.y2] = '%', cc++;
  }
  for (int y = r.y1; y <= r.y2; y++) {
    if (a[r.x1][y] == '.' || a[r.x2][y] == '.') return 0;
    if (a[r.x1][y] == '#') a[r.x1][y] = '%', cc++;
    if (a[r.x2][y] == '#') a[r.x2][y] = '%', cc++;
  }
  return 1;
}
void print(rect r) {
  printf("%d %d %d %d\n", r.x1 + 1, r.y1 + 1, r.x2 + 1, r.y2 + 1);
}
void clear(rect r) {
  for (int x = r.x1; x <= r.x2; x++) {
    if (a[x][r.y1] == '%') a[x][r.y1] = '#';
    if (a[x][r.y2] == '%') a[x][r.y2] = '#';
  }
  for (int y = r.y1; y <= r.y2; y++) {
    if (a[r.x1][y] == '%') a[r.x1][y] = '#';
    if (a[r.x2][y] == '%') a[r.x2][y] = '#';
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int c = 0;
  for (int i = 0; i < n; i++) {
    scanf("%s", a[i]);
    for (int j = 0; j < m; j++)
      if (a[i][j] == '#') c++;
  }
  int hn = 0, h[1000], vn = 0, v[1000];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m - 2; j++)
      if (a[i][j] == '#' && a[i][j + 1] == '#' && a[i][j + 2] == '#') {
        h[hn++] = i;
        break;
      }
  for (int j = 0; j < m; j++)
    for (int i = 0; i < n - 2; i++)
      if (a[i][j] == '#' && a[i + 1][j] == '#' && a[i + 2][j] == '#') {
        v[vn++] = j;
        break;
      }
  if (hn > 4) {
    h[2] = h[hn - 2];
    h[3] = h[hn - 1];
    hn = 4;
  }
  if (vn > 4) {
    v[2] = v[vn - 2];
    v[3] = v[vn - 1];
    vn = 4;
  }
  int rects_n = 0;
  rect rects[40];
  for (int i1 = 0; i1 < hn; i1++)
    for (int i2 = i1; i2 < hn; i2++)
      for (int j1 = 0; j1 < vn; j1++)
        for (int j2 = j1; j2 < vn; j2++)
          if (h[i2] - h[i1] > 1 && v[j2] - v[j1] > 1) {
            rect r = {h[i1], v[j1], h[i2], v[j2]};
            rects[rects_n++] = r;
          }
  for (int i = 0; i < rects_n; i++)
    for (int j = i; j < rects_n; j++) {
      rect r1 = rects[i], r2 = rects[j];
      cc = 0;
      if (cover(r1) && cover(r2) && cc == c) {
        puts("YES");
        print(r1);
        print(r2);
        return 0;
      }
      clear(r1);
      clear(r2);
    }
  puts("NO");
  return 0;
}