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;
const int MAXN = 1005;
bool b[MAXN][MAXN];
int n, m;
bool ux[MAXN], uy[MAXN];
int x = 0, y = 0;
int nn = 0, mm = 0;
bool a[10][10];
int tox[MAXN], toy[MAXN];
int prt(int x, bool f) {
  if (!f)
    for (int i = 1;; i++)
      if (tox[i] == x)
        return i;
      else
        ;
  else
    for (int i = 1;; i++)
      if (toy[i] == x) return i;
}
bool chk(int x, int y) {
  if (!b[x - 1][y]) return !b[x + 1][y - 1] || !b[x + 1][y + 1];
  if (!b[x + 1][y]) return !b[x - 1][y - 1] || !b[x - 1][y + 1];
  if (!b[x][y - 1]) return !b[x - 1][y + 1] || !b[x + 1][y + 1];
  if (!b[x][y + 1]) return !b[x - 1][y - 1] || !b[x + 1][y - 1];
}
int main() {
  scanf("%d%d", &n, &m);
  int maxx = -1, minx = 100000, maxy = -1, miny = 100000;
  for (int i = 1; i <= n; i++) {
    char tmp[MAXN];
    scanf("%s", tmp + 1);
    for (int j = 1; j <= m; j++)
      if (tmp[j] == '#') {
        b[i][j] = true;
        if (i < minx) minx = i;
        if (i > maxx) maxx = i;
        if (j < miny) miny = j;
        if (j > maxy) maxy = j;
      }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (b[i][j]) {
        if ((int)b[i - 1][j] + (int)b[i + 1][j] + (int)b[i][j - 1] +
                (int)b[i][j + 1] <=
            1) {
          printf("NO\n");
          return 0;
        }
        if ((b[i - 1][j] || b[i + 1][j]) && (b[i][j - 1] || b[i][j + 1])) {
          int k = (int)b[i - 1][j] + (int)b[i + 1][j] + (int)b[i][j - 1] +
                  (int)b[i][j + 1];
          if (k == 2 ||
              k == 4 && (!b[i - 1][j - 1] || !b[i - 1][j + 1] ||
                         !b[i + 1][j - 1] || !b[i + 1][j + 1]) ||
              k == 3 && chk(i, j)) {
            if (!ux[i]) ux[i] = true, x++;
            if (!uy[j]) uy[j] = true, y++;
          }
          if (k >= 3 && i - 1 == minx || i + 1 == maxx)
            if (!ux[i]) ux[i] = true, x++;
          if (k >= 3 && j - 1 == miny || j + 1 == maxy)
            if (!uy[j]) uy[j] = true, y++;
        }
      }
  }
  if (x > 4 || y > 4) {
    printf("NO\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (ux[i] || ux[i - 1]) tox[i] = ++nn;
    tox[i] = nn;
  }
  for (int i = 1; i <= m; i++) {
    if (uy[i] || uy[i - 1]) toy[i] = ++mm;
    toy[i] = mm;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (b[i][j]) a[tox[i]][toy[j]] = true;
  n = nn;
  m = mm;
  for (int i1 = 1; i1 <= n; i1++)
    for (int j1 = 1; j1 <= m; j1++)
      for (int i2 = i1 + 2; i2 <= n; i2++)
        for (int j2 = j1 + 2; j2 <= m; j2++)
          for (int i3 = 1; i3 <= n; i3++)
            for (int j3 = 1; j3 <= m; j3++)
              for (int i4 = i3 + 2; i4 <= n; i4++)
                for (int j4 = j3 + 2; j4 <= m; j4++) {
                  bool flag = true;
                  for (int k = 1; k <= n; k++)
                    for (int l = 1; l <= m; l++)
                      if ((((k == i1 || k == i2) && j1 <= l && l <= j2) ||
                           ((l == j1 || l == j2) && i1 <= k && k <= i2) ||
                           ((k == i3 || k == i4) && j3 <= l && l <= j4) ||
                           ((l == j3 || l == j4) && i3 <= k && k <= i4)) ^
                          a[k][l])
                        flag = false;
                  if (flag) {
                    printf("YES\n");
                    printf("%d %d %d %d\n%d %d %d %d\n", prt(i1, 0), prt(j1, 1),
                           prt(i2, 0), prt(j2, 1), prt(i3, 0), prt(j3, 1),
                           prt(i4, 0), prt(j4, 1));
                    return 0;
                  }
                }
  printf("NO\n");
  return 0;
}