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;
inline void Fail() {
  printf("NO");
  exit(0);
}
const int maxn = 1005;
int n, m, tot, cur;
int p[4], q[4];
char s[maxn][maxn];
vector<int> tx, ty;
set<int> sx, sy;
vector<vector<int> > px, py;
int vis[maxn][maxn];
void upd(int &a, int b) {
  if (!a) cur++;
  a += b;
}
void paint(int x1, int y1, int x2, int y2, int tp) {
  for (int i = x1 + 1; i < x2; i++) {
    if (s[i][y1] == '.' || s[i][y2] == '.') cur = 1e9;
    upd(vis[i][y1], tp);
    upd(vis[i][y2], tp);
  }
  for (int i = y1; i <= y2; i++) {
    if (s[x1][i] == '.' || s[x2][i] == '.') cur = 1e9;
    upd(vis[x1][i], tp);
    upd(vis[x2][i], tp);
  }
}
bool check(vector<int> xs, vector<int> ys) {
  for (int(i) = 0; (i) < 4; i++) p[i] = xs[i], q[i] = ys[i];
  sort(p, p + 4);
  sort(q, q + 4);
  do {
    do {
      cur = 0;
      if (p[1] - p[0] < 2 || q[1] - q[0] < 2 || p[3] - p[2] < 2 ||
          q[3] - q[2] < 2)
        continue;
      paint(p[0], q[0], p[1], q[1], 1);
      paint(p[2], q[2], p[3], q[3], 1);
      if (cur == tot) {
        printf("YES\n");
        printf("%d %d %d %d\n", p[0] + 1, q[0] + 1, p[1] + 1, q[1] + 1);
        printf("%d %d %d %d\n", p[2] + 1, q[2] + 1, p[3] + 1, q[3] + 1);
        exit(0);
      }
      paint(p[0], q[0], p[1], q[1], -1);
      paint(p[2], q[2], p[3], q[3], -1);
    } while (next_permutation(q, q + 4));
  } while (next_permutation(p, p + 4));
}
vector<vector<int> > gen(vector<int> t, set<int> s) {
  vector<vector<int> > res;
  if (t.size() == 4)
    res.push_back(t);
  else if (t.size() == 3) {
    for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
      vector<int> tmp = t;
      tmp.push_back(*it);
      res.push_back(tmp);
    }
  } else {
    for (set<int>::iterator it = s.begin(); it != s.end(); it++)
      for (set<int>::iterator it2 = s.begin(); it2 != s.end(); it2++) {
        if (it == it2) continue;
        vector<int> tmp = t;
        tmp.push_back(*it);
        tmp.push_back(*it2);
        res.push_back(tmp);
      }
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int(i) = 0; (i) < n; i++) scanf("%s", s[i]);
  for (int(i) = 0; (i) < n; i++) {
    int cnt = 0;
    bool ok = false;
    for (int(j) = 0; (j) < m; j++)
      if (s[i][j] == '#') {
        cnt++;
        tot++;
        if (!i || s[i - 1][j] == '.') ok = true;
        if (i == n - 1 || s[i + 1][j] == '.') ok = true;
      }
    if (cnt >= 5 || ok) tx.push_back(i);
  }
  for (int(j) = 0; (j) < m; j++) {
    int cnt = 0;
    bool ok = false;
    for (int(i) = 0; (i) < n; i++)
      if (s[i][j] == '#') {
        cnt++;
        if (!j || s[i][j - 1] == '.') ok = true;
        if (j == m - 1 || s[i][j + 1] == '.') ok = true;
      }
    if (cnt >= 5 || ok) ty.push_back(j);
  }
  if (tx.size() < 2 || tx.size() > 4 || ty.size() < 2 || ty.size() > 4) Fail();
  for (int(i) = 0; (i) < tx.size(); i++)
    for (int j = -2; j <= 2; j++) {
      if (tx[i] + j >= tx[0] && tx[i] + j <= tx.back()) sx.insert(tx[i] + j);
    }
  for (int(i) = 0; (i) < ty.size(); i++)
    for (int j = -2; j <= 2; j++) {
      if (ty[i] + j >= ty[0] && ty[i] + j <= ty.back()) sy.insert(ty[i] + j);
    }
  px = gen(tx, sx);
  py = gen(ty, sy);
  for (int(i) = 0; (i) < px.size(); i++)
    for (int(j) = 0; (j) < py.size(); j++) {
      vector<int> xs = px[i], ys = py[j];
      check(xs, ys);
    }
  Fail();
  return 0;
}