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;
int n, m;
vector<pair<int, int> > black;
vector<pair<int, int> > rt;
char a[1005][1005];
void init() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
}
bool paint(int x, int x2, int y, int y2) {
  for (int i = x; i <= x2; i++) {
    if (a[i][y] == '.' || a[i][y2] == '.') return false;
    rt.push_back(make_pair(i, y));
    rt.push_back(make_pair(i, y2));
  }
  for (int j = y; j <= y2; j++) {
    if (a[x][j] == '.' || a[x2][j] == '.') return false;
    rt.push_back(make_pair(x, j));
    rt.push_back(make_pair(x2, j));
  }
  return true;
}
void check(vector<int> x, vector<int> y) {
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  do {
    do {
      rt.clear();
      if (x[1] - x[0] < 2 || y[1] - y[0] < 2 || x[3] - x[2] < 2 ||
          y[3] - y[2] < 2)
        continue;
      if (!paint(x[0], x[1], y[0], y[1]) || !paint(x[2], x[3], y[2], y[3]))
        continue;
      int flag = 1;
      sort(rt.begin(), rt.end());
      int cnt = unique(rt.begin(), rt.end()) - rt.begin();
      if (cnt != black.size())
        flag = 0;
      else
        for (int i = 0; i < black.size(); i++)
          if (rt[i] != black[i]) flag = 0;
      if (flag) {
        puts("YES");
        printf("%d %d %d %d\n", x[0] + 1, y[0] + 1, x[1] + 1, y[1] + 1);
        printf("%d %d %d %d\n", 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()));
}
vector<vector<int> > get(vector<int> v, set<int> s) {
  vector<vector<int> > ans;
  if (v.size() == 4) {
    ans.push_back(v);
  }
  if (v.size() == 3) {
    for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
      vector<int> w = v;
      w.push_back(*it);
      ans.push_back(w);
    }
  }
  if (v.size() == 2) {
    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) {
          vector<int> w = v;
          w.push_back(*it), w.push_back(*it2);
          ans.push_back(w);
        }
  }
  return ans;
}
int main() {
  init();
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == '#') black.push_back(make_pair(i, j));
  sort(black.begin(), black.end());
  vector<int> vx;
  vector<int> vy;
  for (int i = 0; i < n; i++) {
    int flag = 0, cnt = 0;
    for (int j = 0; j < m; j++)
      if (a[i][j] == '#') cnt++;
    if (cnt >= 5) flag = 1;
    for (int j = 0; j < m; j++)
      if (a[i][j] == '#')
        if (i == 0 || i == n - 1 || a[i - 1][j] == '.' || a[i + 1][j] == '.')
          flag = 1;
    if (flag) vx.push_back(i);
  }
  for (int j = 0; j < m; j++) {
    int flag = 0, cnt = 0;
    for (int i = 0; i < n; i++)
      if (a[i][j] == '#') cnt++;
    if (cnt >= 5) flag = 1;
    for (int i = 0; i < n; i++)
      if (a[i][j] == '#')
        if (j == 0 || a[i][j - 1] == '.' || j == m - 1 || a[i][j + 1] == '.')
          flag = 1;
    if (flag) vy.push_back(j);
  }
  if (vx.size() < 2 || vx.size() > 4 || vy.size() < 2 || vy.size() > 4) {
    printf("NO");
    return 0;
  }
  set<int> sx, sy;
  for (int i = 0; i < vx.size(); i++)
    for (int j = -1; j <= 1; j++)
      if (vx[i] + j >= vx[0] && vx[i] + j <= vx[vx.size() - 1])
        sx.insert(vx[i] + j);
  for (int i = 0; i < vy.size(); i++)
    for (int j = -1; j <= 1; j++)
      if (vy[i] + j >= vy[0] && vy[i] + j <= vy[vy.size() - 1])
        sy.insert(vy[i] + j);
  vector<vector<int> > xcnt = get(vx, sx);
  vector<vector<int> > ycnt = get(vy, sy);
  for (int i = 0; i < xcnt.size(); i++)
    for (int j = 0; j < ycnt.size(); j++) {
      check(xcnt[i], ycnt[j]);
    }
  puts("NO");
  return 0;
}