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;
int n, m, w, cnt, tot;
char s[maxN][maxN];
int bo[maxN][maxN];
vector<int> xx, yy;
void init() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", s[i] + 1);
    for (int j = 1; j <= m; ++j)
      if (s[i][j] == '#') ++tot;
  }
  for (int i = 1; i <= n; ++i) {
    bool flag = 0;
    for (int j = 1; j <= m - 2; ++j)
      if (s[i][j] == '#' && s[i][j + 1] == '#' && s[i][j + 2] == '#') flag = 1;
    if (flag) xx.push_back(i);
  }
  for (int i = 1; i <= m; ++i) {
    bool flag = 0;
    for (int j = 1; j <= n - 2; ++j)
      if (s[j][i] == '#' && s[j + 1][i] == '#' && s[j + 2][i] == '#') flag = 1;
    if (flag) yy.push_back(i);
  }
}
bool check(int x1, int x2, int y1, int y2) {
  for (int i = x1; i <= x2; ++i) {
    if (bo[i][y1] != w) {
      if (s[i][y1] != '#') return 0;
      bo[i][y1] = w;
      ++cnt;
    }
    if (bo[i][y2] != w) {
      if (s[i][y2] != '#') return 0;
      bo[i][y2] = w;
      ++cnt;
    }
  }
  for (int i = y1; i <= y2; ++i) {
    if (bo[x1][i] != w) {
      if (s[x1][i] != '#') return 0;
      bo[x1][i] = w;
      ++cnt;
    }
    if (bo[x2][i] != w) {
      if (s[x2][i] != '#') return 0;
      bo[x2][i] = w;
      ++cnt;
    }
  }
  return 1;
}
void work() {
  int nn, mm;
  if (xx.size() > 4) xx.erase(++ ++xx.begin(), -- --xx.end());
  if (yy.size() > 4) yy.erase(++ ++yy.begin(), -- --yy.end());
  nn = xx.size() - 1;
  mm = yy.size() - 1;
  for (int ax1 = 0; ax1 <= nn; ++ax1)
    for (int ax2 = ax1; ax2 <= nn; ++ax2)
      if (xx[ax2] - xx[ax1] >= 2)
        for (int ay1 = 0; ay1 <= mm; ++ay1)
          for (int ay2 = ay1; ay2 <= mm; ++ay2)
            if (yy[ay2] - yy[ay1] >= 2)
              for (int bx1 = 0; bx1 <= nn; ++bx1)
                for (int bx2 = bx1; bx2 <= nn; ++bx2)
                  if (xx[bx2] - xx[bx1] >= 2)
                    for (int by1 = 0; by1 <= mm; ++by1)
                      for (int by2 = by1; by2 <= mm; ++by2)
                        if (yy[by2] - yy[by1] >= 2) {
                          cnt = 0;
                          ++w;
                          if (check(xx[ax1], xx[ax2], yy[ay1], yy[ay2]) &&
                              check(xx[bx1], xx[bx2], yy[by1], yy[by2]) &&
                              cnt == tot) {
                            puts("YES");
                            printf("%d %d %d %d\n", xx[ax1], yy[ay1], xx[ax2],
                                   yy[ay2]);
                            printf("%d %d %d %d\n", xx[bx1], yy[by1], xx[bx2],
                                   yy[by2]);
                            return;
                          }
                        }
  puts("NO");
}
int main() {
  init();
  work();
  return 0;
}