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>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    ;
  F && (T = -T);
}
void Get(char &C) {
  for (; C = getchar(), C != '.' && C != '#';)
    ;
}
int N, M;
char A[1005][1005];
void Init() {
  Get(N);
  Get(M);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= M; j++) {
      Get(A[i][j]);
    }
}
int QX[1005], QXTop;
int QY[1005], QYTop;
void Check(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4) {
  if (X1 > X2) std::swap(X1, X2);
  if (Y1 > Y2) std::swap(Y1, Y2);
  if (X3 > X4) std::swap(X3, X4);
  if (Y3 > Y4) std::swap(Y3, Y4);
  if (X2 - X1 < 2) return;
  if (Y2 - Y1 < 2) return;
  if (X4 - X3 < 2) return;
  if (Y4 - Y3 < 2) return;
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= M; j++)
      if ((((i == X1 || i == X2) && Y1 <= j && j <= Y2) ||
           ((j == Y1 || j == Y2) && X1 <= i && i <= X2) ||
           ((i == X3 || i == X4) && Y3 <= j && j <= Y4) ||
           ((j == Y3 || j == Y4) && X3 <= i && i <= X4)) != (A[i][j] == '#'))
        return;
  }
  puts("YES");
  printf("%d %d %d %d\n", X1, Y1, X2, Y2);
  printf("%d %d %d %d\n", X3, Y3, X4, Y4);
  exit(0);
}
void Work() {
  for (int i = 1; i <= N; i++)
    for (int j = 3; j <= M; j++)
      if (A[i][j] == '#' && A[i][j - 1] == '#' && A[i][j - 2] == '#') {
        QX[++QXTop] = i;
        break;
      }
  for (int j = 1; j <= M; j++)
    for (int i = 3; i <= N; i++)
      if (A[i - 1][j] == '#' && A[i][j] == '#' && A[i - 2][j] == '#') {
        QY[++QYTop] = j;
        break;
      }
  if (QYTop == 4) {
    int X1, X2, X3, X4;
    for (int i = 1; i <= N; i++)
      if (A[i][QY[1]] == '#') {
        X2 = i;
      }
    for (int i = N; i >= 1; i--)
      if (A[i][QY[1]] == '#') {
        X1 = i;
      }
    for (int i = 1; i <= N; i++)
      if (A[i][QY[4]] == '#') {
        X4 = i;
      }
    for (int i = N; i >= 1; i--)
      if (A[i][QY[4]] == '#') {
        X3 = i;
      }
    Check(X1, QY[1], X2, QY[3], X3, QY[2], X4, QY[4]);
  }
  if (QXTop == 4) {
    int Y1, Y2, Y3, Y4;
    for (int j = 1; j <= M; j++)
      if (A[QX[1]][j] == '#') {
        Y2 = j;
      }
    for (int j = M; j >= 1; j--)
      if (A[QX[1]][j] == '#') {
        Y1 = j;
      }
    for (int j = 1; j <= M; j++)
      if (A[QX[4]][j] == '#') {
        Y4 = j;
      }
    for (int j = M; j >= 1; j--)
      if (A[QX[4]][j] == '#') {
        Y3 = j;
      }
    Check(QX[1], Y1, QX[3], Y2, QX[2], Y3, QX[4], Y4);
  }
  if (QYTop <= 4 && QXTop <= 4) {
    for (int i = 1; i <= QXTop; i++)
      for (int j = 1; j <= QYTop; j++)
        for (int p = i + 1; p <= QXTop; p++)
          for (int q = j + 1; q <= QYTop; q++)
            for (int i2 = 1; i2 <= QXTop; i2++)
              for (int j2 = 1; j2 <= QYTop; j2++)
                for (int p2 = i2 + 1; p2 <= QXTop; p2++)
                  for (int q2 = j2 + 1; q2 <= QYTop; q2++) {
                    int S[5];
                    S[1] = S[2] = S[3] = S[4] = 0;
                    S[i]++;
                    S[p]++;
                    S[i2]++;
                    S[p2]++;
                    if (S[1] == 0 && 1 <= QXTop) continue;
                    if (S[2] == 0 && 2 <= QXTop) continue;
                    if (S[3] == 0 && 3 <= QXTop) continue;
                    if (S[4] == 0 && 4 <= QXTop) continue;
                    S[1] = S[2] = S[3] = S[4] = 0;
                    S[j]++;
                    S[q]++;
                    S[j2]++;
                    S[q2]++;
                    if (S[1] == 0 && 1 <= QYTop) continue;
                    if (S[2] == 0 && 2 <= QYTop) continue;
                    if (S[3] == 0 && 3 <= QYTop) continue;
                    if (S[4] == 0 && 4 <= QYTop) continue;
                    Check(QX[i], QY[j], QX[p], QY[q], QX[i2], QY[j2], QX[p2],
                          QY[q2]);
                  }
  }
}
void Output() { puts("NO"); }
int main() {
  Init();
  Work();
  Output();
  return 0;
}