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 MAX_N = 1000 + 10;
int N, M;
int sum;
int tx, ty;
char str[MAX_N];
int a[MAX_N][MAX_N];
int flag[MAX_N][MAX_N];
int xx[MAX_N];
int yy[MAX_N];
int rex[MAX_N];
int rey[MAX_N];
int cx[10];
int cy[10];
void Init() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; ++i) {
    scanf("%s", str + 1);
    for (int j = 1; j <= M; ++j)
      if (str[j] == '#') {
        a[i][j] = 1;
        ++sum;
      }
  }
  for (int i = 1; i <= N; ++i) {
    int cnt = 0;
    for (int j = 1; j <= M; ++j)
      if (a[i][j]) {
        ++cnt;
        if (cnt == 3) {
          xx[++tx] = i;
          break;
        }
      } else
        cnt = 0;
  }
  for (int j = 1; j <= M; ++j) {
    int cnt = 0;
    for (int i = 1; i <= N; ++i)
      if (a[i][j]) {
        ++cnt;
        if (cnt == 3) {
          yy[++ty] = j;
          break;
        }
      } else
        cnt = 0;
  }
}
int Check_Last(int u1, int d1, int l1, int r1, int u2, int d2, int l2, int r2) {
  int cnt = 0;
  memset(flag, 0, sizeof flag);
  for (int i = l1; i <= r1; ++i) {
    if (!a[u1][i]) return false;
    if (!a[d1][i]) return false;
    if (!flag[u1][i]) {
      flag[u1][i] = true;
      ++cnt;
    }
    if (!flag[d1][i]) {
      flag[d1][i] = true;
      ++cnt;
    }
  }
  for (int i = u1; i <= d1; ++i) {
    if (!a[i][l1]) return false;
    if (!a[i][r1]) return false;
    if (!flag[i][l1]) {
      flag[i][l1] = true;
      ++cnt;
    }
    if (!flag[i][r1]) {
      flag[i][r1] = true;
      ++cnt;
    }
  }
  for (int i = l2; i <= r2; ++i) {
    if (!a[u2][i]) return false;
    if (!a[d2][i]) return false;
    if (!flag[u2][i]) {
      flag[u2][i] = true;
      ++cnt;
    }
    if (!flag[d2][i]) {
      flag[d2][i] = true;
      ++cnt;
    }
  }
  for (int i = u2; i <= d2; ++i) {
    if (!a[i][l2]) return false;
    if (!a[i][r2]) return false;
    if (!flag[i][l2]) {
      flag[i][l2] = true;
      ++cnt;
    }
    if (!flag[i][r2]) {
      flag[i][r2] = true;
      ++cnt;
    }
  }
  return cnt == sum;
}
int Check(int u1, int d1, int l1, int r1, int u2, int d2, int l2, int r2) {
  u1 = xx[u1];
  d1 = xx[d1];
  l1 = yy[l1];
  r1 = yy[r1];
  if (d1 - u1 + 1 < 3) return false;
  if (r1 - l1 + 1 < 3) return false;
  u2 = xx[u2];
  d2 = xx[d2];
  l2 = yy[l2];
  r2 = yy[r2];
  if (d2 - u2 + 1 < 3) return false;
  if (r2 - l2 + 1 < 3) return false;
  if (!Check_Last(u1, d1, l1, r1, u2, d2, l2, r2)) return false;
  printf("YES\n");
  printf("%d %d %d %d\n", u1, l1, d1, r1);
  printf("%d %d %d %d\n", u2, l2, d2, r2);
  return true;
}
int Solve() {
  if (tx < 2 || ty < 2) return true;
  sort(xx + 1, xx + tx + 1);
  sort(yy + 1, yy + ty + 1);
  if (tx > 4) {
    xx[3] = xx[tx - 1];
    xx[4] = xx[tx];
    tx = 4;
  }
  if (ty > 4) {
    yy[3] = yy[ty - 1];
    yy[4] = yy[ty];
    ty = 4;
  }
  for (int i1 = 1; i1 <= tx; ++i1)
    for (int i2 = i1 + 1; i2 <= tx; ++i2)
      for (int j1 = 1; j1 <= ty; ++j1)
        for (int j2 = j1 + 1; j2 <= ty; ++j2)
          for (int k1 = 1; k1 <= tx; ++k1)
            for (int k2 = k1 + 1; k2 <= tx; ++k2)
              for (int l1 = 1; l1 <= ty; ++l1)
                for (int l2 = l1 + 1; l2 <= ty; ++l2)
                  if (Check(i1, i2, j1, j2, k1, k2, l1, l2)) return false;
  return true;
}
int main() {
  Init();
  if (Solve()) cout << "NO" << endl;
  return 0;
}