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;
pair<int, int> p[1100 * 1100];
int n, m;
char mat[1100][1100];
int sum[1100][1100];
int get(int x0, int y0, int x1, int y1) {
  return sum[x1][y1] - sum[x1][y0 - 1] - sum[x0 - 1][y1] + sum[x0 - 1][y0 - 1];
}
bool canRec(int x0, int y0, int x1, int y1) {
  if (x1 < x0 + 2 || y1 < y0 + 2) return false;
  if (get(x0, y0, x0, y1) != (y1 - y0 + 1)) return false;
  if (get(x0, y0, x1, y0) != (x1 - x0 + 1)) return false;
  if (get(x1, y0, x1, y1) != (y1 - y0 + 1)) return false;
  if (get(x0, y1, x1, y1) != (x1 - x0 + 1)) return false;
  return true;
}
bool in(int x0, int y0, int x1, int y1, int x, int y) {
  if (x >= x0 && x <= x1 && (y == y0 || y == y1)) return true;
  if (y >= y0 && y <= y1 && (x == x0 || x == x1)) return true;
  return false;
}
int main() {
  while (scanf("%d %d", &n, &m) != EOF) {
    int cnt = 0;
    for (int i = (1); i < (n + 1); i++) {
      scanf(" %s", mat[i] + 1);
      for (int j = (1); j < (m + 1); j++) {
        sum[i][j] = sum[i][j - 1] + sum[i - 1][j] - sum[i - 1][j - 1] +
                    (mat[i][j] == '#');
        if (mat[i][j] == '#') {
          p[cnt++] = make_pair(i, j);
        }
      }
    }
    if (cnt > 8100) {
      puts("NO");
      continue;
    }
    sort(p, p + cnt);
    for (int i = (1); i < (cnt); i++) {
      int x0 = p[0].first, y0 = p[0].second;
      int x1 = p[i].first, y1 = p[i].second;
      if (canRec(x0, y0, x1, y1) == false) continue;
      set<int> stx, sty;
      stx.insert(x0);
      stx.insert(x1);
      sty.insert(y0);
      sty.insert(y1);
      int xma = 0, xmi = 10000, yma = xma, ymi = xmi;
      int num = 0;
      for (int j = (0); j < (cnt); j++)
        if (in(x0, y0, x1, y1, p[j].first, p[j].second) == false) {
          xma = max(xma, p[j].first);
          xmi = min(xmi, p[j].first);
          yma = max(yma, p[j].second);
          ymi = min(ymi, p[j].second);
          num++;
        }
      if (num == 0) {
        puts("YES");
        printf("%d %d %d %d\n", x0, y0, x1, y1);
        printf("%d %d %d %d\n", x0, y0, x1, y1);
        return 0;
      }
      stx.insert(xmi);
      if (xmi - 1 > 0) stx.insert(xmi - 1);
      stx.insert(xma);
      if (xma + 1 <= n) stx.insert(xma + 1);
      sty.insert(ymi);
      if (ymi - 1 > 0) sty.insert(ymi - 1);
      sty.insert(yma);
      if (yma + 1 <= m) sty.insert(yma + 1);
      for (typeof(stx.begin()) itx1 = stx.begin(); itx1 != stx.end(); ++itx1)
        for (typeof(stx.begin()) itx2 = stx.begin(); itx2 != stx.end();
             ++itx2) {
          if (*itx1 + 2 <= *itx2) {
            for (typeof(sty.begin()) ity1 = sty.begin(); ity1 != sty.end();
                 ++ity1)
              for (typeof(sty.begin()) ity2 = sty.begin(); ity2 != sty.end();
                   ++ity2) {
                if (*ity1 + 2 <= *ity2) {
                  int _x0 = *itx1, _y0 = *ity1;
                  int _x1 = *itx2, _y1 = *ity2;
                  if (canRec(_x0, _y0, _x1, _y1) == false) continue;
                  bool suc = true;
                  for (int j = (0); j < (cnt); j++) {
                    if (in(x0, y0, x1, y1, p[j].first, p[j].second)) continue;
                    if (in(_x0, _y0, _x1, _y1, p[j].first, p[j].second))
                      continue;
                    suc = false;
                    break;
                  }
                  if (suc) {
                    puts("YES");
                    printf("%d %d %d %d\n", x0, y0, x1, y1);
                    printf("%d %d %d %d\n", _x0, _y0, _x1, _y1);
                    return 0;
                  }
                }
              }
          }
        }
    }
    puts("NO");
  }
}