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;
template <typename T>
inline void read(T &a) {
  register int b = 1, c = getchar();
  a = 0;
  for (; !isdigit(c); c = getchar())
    if (c == 45) b *= -1;
  for (; isdigit(c); c = getchar()) a = (a << 3) + (a << 1) + (c ^ 48);
  a *= b;
}
const int maxn = 1005;
int n, m;
char s[maxn][maxn], tmp[maxn][maxn];
void getfull(const vector<int> &x, const set<int> &extx,
             vector<vector<int> > &fullx) {
  if (int((x).size()) == 4) {
    fullx.push_back(x);
    return;
  }
  if (int((x).size()) == 3) {
    for (set<int>::iterator it = extx.begin(); it != extx.end(); it++) {
      vector<int> y = x;
      y.push_back(*it);
      fullx.push_back(y);
    }
    return;
  }
  for (set<int>::iterator it = extx.begin(); it != extx.end(); it++) {
    for (set<int>::iterator jt = extx.begin(); jt != extx.end(); jt++) {
      vector<int> y = x;
      y.push_back(*it);
      y.push_back(*jt);
      fullx.push_back(y);
    }
  }
}
void clear() {
  for (int i = 0; i < int(n); i++)
    for (int j = 0; j < int(m); j++) tmp[i][j] = '.';
}
void draw(int X0, int Y0, int X1, int Y1) {
  for (int i = 0; i < int(X1 - X0 + 1); i++)
    tmp[i + X0][Y0] = tmp[i + X0][Y1] = '#';
  for (int j = 0; j < int(Y1 - Y0 + 1); j++)
    tmp[X0][j + Y0] = tmp[X1][j + Y0] = '#';
}
bool equal() {
  for (int i = 0; i < int(n); i++)
    for (int j = 0; j < int(m); j++)
      if (tmp[i][j] != s[i][j]) return 0;
  return 1;
}
void check(vector<int> &x, vector<int> &y) {
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  do {
    do {
      if (x[1] - x[0] >= 2 && x[3] - x[2] >= 2 && y[1] - y[0] >= 2 &&
          y[3] - y[2] >= 2) {
        clear();
        draw(x[0], y[0], x[1], y[1]);
        draw(x[2], y[2], x[3], y[3]);
        if (equal()) {
          puts("YES");
          printf("%d %d %d %d\n%d %d %d %d\n", x[0] + 1, y[0] + 1, x[1] + 1,
                 y[1] + 1, x[2] + 1, y[2] + 1, x[3] + 1, y[3] + 1);
          exit(0);
        }
      }
    } while (next_permutation(y.begin(), y.end()));
  } while (next_permutation(x.begin(), x.end()));
}
int main() {
  read(n);
  read(m);
  vector<int> x, y;
  for (int i = 0; i < int(n); i++) scanf("%s", s[i]);
  for (int i = 0; i < int(n); i++) {
    bool must = 0;
    int cnt = 0;
    for (int j = 0; j < int(m); j++) {
      if (s[i][j] == '#') {
        cnt++;
        if (i - 1 < 0 || s[i - 1][j] == '.') must = 1;
        if (i + 1 >= n || s[i + 1][j] == '.') must = 1;
      }
    }
    if (cnt > 4) must = 1;
    if (must) x.push_back(i);
  }
  for (int j = 0; j < int(m); j++) {
    bool must = 0;
    int cnt = 0;
    for (int i = 0; i < int(n); i++) {
      if (s[i][j] == '#') {
        cnt++;
        if (j - 1 < 0 || s[i][j - 1] == '.') must = 1;
        if (j + 1 >= m || s[i][j + 1] == '.') must = 1;
      }
    }
    if (cnt > 4) must = 1;
    if (must) y.push_back(j);
  }
  if (int((x).size()) < 2 || int((x).size()) > 4 || int((y).size()) < 2 ||
      int((y).size()) > 4) {
    puts("NO");
    return 0;
  }
  set<int> extx, exty;
  for (int i = 0; i < int(int((x).size())); i++) {
    if (x[i] >= 1) extx.insert(x[i] - 1);
    extx.insert(x[i]);
    if (x[i] + 1 < n) extx.insert(x[i] + 1);
  }
  for (int i = 0; i < int(int((y).size())); i++) {
    if (y[i] >= 1) exty.insert(y[i] - 1);
    exty.insert(y[i]);
    if (y[i] + 1 < m) exty.insert(y[i] + 1);
  }
  vector<vector<int> > fullx, fully;
  getfull(x, extx, fullx);
  getfull(y, exty, fully);
  for (int i = 0; i < int(int((fullx).size())); i++) {
    for (int j = 0; j < int(int((fully).size())); j++) {
      check(fullx[i], fully[j]);
    }
  }
  puts("NO");
  return 0;
}