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 m, n, j, k, l, i, o, p, __t, Tot, t;
string Map[1100];
vector<int> X, Y;
int C[1100][1100], tl, cx[10000], cy[10000];
void cover(int x, int y) {
  if (C[x][y] != tl) C[x][y] = tl, Tot++;
}
bool Cover(int x1, int x2, int y1, int y2) {
  for (int i = (y1); i <= (y2); i++) {
    if (Map[x1][i] != '#') return 0;
    if (Map[x2][i] != '#') return 0;
    cover(x1, i);
    cover(x2, i);
  }
  for (int i = (x1 + 1); i <= (x2 - 1); i++) {
    if (Map[i][y1] != '#') return 0;
    if (Map[i][y2] != '#') return 0;
    cover(i, y1);
    cover(i, y2);
  }
  return 1;
}
int main() {
  scanf("%d%d", &m, &n);
  for (int i = (0); i <= (m - 1); i++) cin >> Map[i];
  for (int i = (0); i <= (m - 1); i++)
    for (int j = (0); j <= (n - 1); j++) {
      if (i && i + 1 < m && Map[i][j] == '#' && Map[i + 1][j] == '#' &&
          Map[i - 1][j] == '#' && !cx[j])
        X.push_back(j), cx[j] = 1;
      if (j && j + 1 < n && Map[i][j] == '#' && Map[i][j - 1] == '#' &&
          Map[i][j - 1] == '#' && !cy[i])
        Y.push_back(i), cy[i] = 1;
      if (Map[i][j] == '#') p++;
    }
  sort(X.begin(), X.end());
  sort(Y.begin(), Y.end());
  if (X.size() > 4) {
    t = X[X.size() - 2];
    X[3] = X[X.size() - 1], X[2] = t;
  }
  if (Y.size() > 4) {
    t = Y[Y.size() - 2];
    Y[3] = Y[Y.size() - 1], Y[2] = t;
  }
  for (int x1 = (0); x1 <= (min(int(Y.size()) - 1, 3)); x1++)
    for (int x2 = (0); x2 <= (min(int(Y.size()) - 1, 3)); x2++)
      for (int x3 = (0); x3 <= (min(int(Y.size()) - 1, 3)); x3++)
        for (int x4 = (0); x4 <= (min(int(Y.size()) - 1, 3)); x4++)
          for (int y1 = (0); y1 <= (min(int(X.size()) - 1, 3)); y1++)
            for (int y2 = (0); y2 <= (min(int(X.size()) - 1, 3)); y2++)
              for (int y3 = (0); y3 <= (min(int(X.size()) - 1, 3)); y3++)
                for (int y4 = (0); y4 <= (min(int(X.size()) - 1, 3)); y4++) {
                  if (Y[x2] - Y[x1] < 2 || Y[x4] - Y[x3] < 2 ||
                      X[y2] - X[y1] < 2 || X[y4] - X[y3] < 2)
                    continue;
                  bool could = 1;
                  Tot = 0;
                  tl++;
                  could &= Cover(Y[x1], Y[x2], X[y1], X[y2]);
                  could &= Cover(Y[x3], Y[x4], X[y3], X[y4]);
                  if (could && Tot == p) {
                    printf("YES\n%d %d %d %d\n%d %d %d %d\n", Y[x1] + 1,
                           X[y1] + 1, Y[x2] + 1, X[y2] + 1, Y[x3] + 1,
                           X[y3] + 1, Y[x4] + 1, X[y4] + 1);
                    return 0;
                  }
                }
  printf("NO\n");
}