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;
char B[Maxn][Maxn];
int tak;
bool vis[Maxn][Maxn];
vector<int> y, x;
bool Check(int x1, int y1, int x2, int y2) {
  if (x2 - x1 < 2 || y2 - y1 < 2) return false;
  for (int i = x1; i <= x2; i++)
    if (B[i][y1] == '.' || B[i][y2] == '.') return false;
  for (int j = y1; j <= y2; j++)
    if (B[x1][j] == '.' || B[x2][j] == '.') return false;
  return true;
}
int Count(int x1, int y1, int x2, int y2) {
  int res = 0;
  for (int i = x1; i <= x2; i++) {
    if (!vis[i][y1]) {
      res++;
      vis[i][y1] = true;
    }
    if (!vis[i][y2]) {
      res++;
      vis[i][y2] = true;
    }
  }
  for (int j = y1; j <= y2; j++) {
    if (!vis[x1][j]) {
      res++;
      vis[x1][j] = true;
    }
    if (!vis[x2][j]) {
      res++;
      vis[x2][j] = true;
    }
  }
  return res;
}
void Clear(int x1, int y1, int x2, int y2) {
  for (int i = x1; i <= x2; i++) vis[i][y1] = vis[i][y2] = false;
  for (int j = y1; j <= y2; j++) vis[x1][j] = vis[x2][j] = false;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      scanf(" %c", &B[i][j]);
      tak += B[i][j] == '#';
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j + 2 < m; j++)
      if (B[i][j] == '#' && B[i][j + 1] == '#' && B[i][j + 2] == '#') {
        y.push_back(i);
        break;
      }
  for (int j = 0; j < m; j++)
    for (int i = 0; i + 2 < n; i++)
      if (B[i][j] == '#' && B[i + 1][j] == '#' && B[i + 2][j] == '#') {
        x.push_back(j);
        break;
      }
  if (y.size() > 4 && x.size() > 4) {
    printf("NO\n");
    return 0;
  }
  if (y.size() > 4) {
    vector<int> tmp;
    tmp.push_back(y[0]);
    tmp.push_back(y[1]);
    tmp.push_back(y[y.size() - 2]);
    tmp.push_back(y.back());
    y = tmp;
  }
  if (x.size() > 4) {
    vector<int> tmp;
    tmp.push_back(x[0]);
    tmp.push_back(x[1]);
    tmp.push_back(x[x.size() - 2]);
    tmp.push_back(x.back());
    x = tmp;
  }
  bool found = false;
  for (int i1 = 0; i1 < y.size() && !found; i1++)
    for (int i2 = i1 + 1; i2 < y.size() && !found; i2++)
      for (int j1 = 0; j1 < x.size() && !found; j1++)
        for (int j2 = j1 + 1; j2 < x.size() && !found; j2++)
          if (Check(y[i1], x[j1], y[i2], x[j2]))
            for (int i3 = 0; i3 < y.size() && !found; i3++)
              for (int i4 = i3 + 1; i4 < y.size() && !found; i4++)
                for (int j3 = 0; j3 < x.size() && !found; j3++)
                  for (int j4 = j3 + 1; j4 < x.size() && !found; j4++)
                    if (Check(y[i3], x[j3], y[i4], x[j4]))
                      if (Count(y[i1], x[j1], y[i2], x[j2]) +
                              Count(y[i3], x[j3], y[i4], x[j4]) ==
                          tak) {
                        found = true;
                        printf("YES\n");
                        printf("%d %d %d %d\n", y[i1] + 1, x[j1] + 1, y[i2] + 1,
                               x[j2] + 1);
                        printf("%d %d %d %d\n", y[i3] + 1, x[j3] + 1, y[i4] + 1,
                               x[j4] + 1);
                      } else {
                        Clear(y[i1], x[j1], y[i2], x[j2]);
                        Clear(y[i3], x[j3], y[i4], x[j4]);
                      }
  if (!found) printf("NO\n");
  return 0;
}