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;
char str[1111];
int a[1111][1111], mark[1111][1111], s[1111][1111];
int X[1111], Y[1111], R, C, Fate;
int mxr[1111], mxc[1111];
inline int fill(int x, int y, int a, int b) {
  int ans = 0;
  for (int i = (a); i <= (x); ++i)
    ans += ((mark[i][y] != Fate) + (mark[i][b] != Fate)),
        mark[i][y] = mark[i][b] = Fate;
  for (int i = (b); i <= (y); ++i)
    ans += ((mark[x][i] != Fate) + (mark[a][i] != Fate)),
        mark[x][i] = mark[a][i] = Fate;
  return ans;
}
inline int gsum(int x, int y, int a, int b) {
  return s[x][y] - s[x][b - 1] - s[a - 1][y] + s[a - 1][b - 1];
}
inline int glen(int x, int y, int a, int b) { return (x - a + y - b) * 2; }
inline int cmax(int x, int y) { return x > y ? x : y; }
inline bool cks(int i, int j, int i1, int j1) {
  return gsum(i, j, i1, j1) - gsum(i - 1, j - 1, i1 + 1, j1 + 1) ==
         glen(i, j, i1, j1);
}
void relax(int n, int mx[], int X[], int &R) {
  for (int i = (1); i <= (n); ++i)
    if (mx[i] > 2) X[++R] = i;
  if (R > 4) {
    X[3] = X[R - 1];
    X[4] = X[R];
    R = 4;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= (n); ++i) {
    scanf("%s", &str);
    for (int j = (1); j <= (m); ++j) {
      a[i][j] = str[j - 1] == '#';
      s[i][j] = s[i - 1][j] + s[i][j - 1] - s[i - 1][j - 1] + a[i][j];
    }
  }
  for (int i = (1); i <= (n); ++i) {
    int cnt = 0;
    for (int j = (1); j <= (m); ++j)
      mxr[i] = cmax(mxr[i], a[i][j] ? (++cnt) : (cnt = 0));
  }
  relax(n, mxr, X, R);
  for (int i = (1); i <= (m); ++i) {
    int cnt = 0;
    for (int j = (1); j <= (n); ++j)
      mxc[i] = cmax(mxc[i], a[j][i] ? (++cnt) : (cnt = 0));
  }
  relax(m, mxc, Y, C);
  for (int i = (1); i <= (R); ++i)
    for (int j = (1); j <= (C); ++j)
      for (int i1 = (1); i1 <= (i - 1); ++i1)
        for (int j1 = (1); j1 <= (j - 1); ++j1)
          for (int p = (1); p <= (R); ++p)
            for (int q = (1); q <= (C); ++q)
              for (int p1 = (1); p1 <= (p - 1); ++p1)
                for (int q1 = (1); q1 <= (q - 1); ++q1) {
                  if (X[i] - X[i1] < 2 || Y[j] - Y[j1] < 2 ||
                      X[p] - X[p1] < 2 || Y[q] - Y[q1] < 2)
                    continue;
                  if (!cks(X[i], Y[j], X[i1], Y[j1]) ||
                      !cks(X[p], Y[q], X[p1], Y[q1]))
                    continue;
                  ++Fate;
                  if (fill(X[i], Y[j], X[i1], Y[j1]) +
                          fill(X[p], Y[q], X[p1], Y[q1]) ==
                      s[n][m]) {
                    printf("YES\n%d %d %d %d\n%d %d %d %d\n", X[i1], Y[j1],
                           X[i], Y[j], X[p1], Y[q1], X[p], Y[q]);
                    return 0;
                  }
                }
  puts("NO");
}