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;
bool isOnBorder(int x, int y,
                pair<pair<int, int>, pair<int, int> > const& rect) {
  pair<int, int> const& left = rect.first;
  pair<int, int> const& right = rect.second;
  if (y == left.second || y == right.second)
    return left.first <= x && x <= right.first;
  if (x == left.first || x == right.first)
    return left.second <= y && y <= right.second;
  return false;
}
void printRect(pair<pair<int, int>, pair<int, int> > const& rect) {
  cout << rect.first.second + 1 << " " << rect.first.first + 1 << " "
       << rect.second.second + 1 << " " << rect.second.first + 1 << endl;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<string> paper(n);
  for (int i = (0); i < ((n)); ++i) cin >> paper[i];
  vector<vector<int> > prows(n, vector<int>(m + 1));
  for (int i = (0); i < ((n)); ++i)
    for (int j = (0); j < ((m)); ++j)
      prows[i][j + 1] = prows[i][j] + (paper[i][j] == '#');
  vector<vector<int> > pcols(m, vector<int>(n + 1));
  for (int j = (0); j < ((m)); ++j)
    for (int i = (0); i < ((n)); ++i)
      pcols[j][i + 1] = pcols[j][i] + (paper[i][j] == '#');
  vector<int> cols, rows;
  for (int i = (0); i < ((n)); ++i) {
    for (int j = (0); j < ((m - 2)); ++j)
      if (paper[i][j] == '#' && paper[i][j + 1] == '#' &&
          paper[i][j + 2] == '#') {
        rows.push_back(i);
        break;
      }
  }
  for (int j = (0); j < ((m)); ++j) {
    for (int i = (0); i < ((n - 2)); ++i)
      if (paper[i][j] == '#' && paper[i + 1][j] == '#' &&
          paper[i + 2][j] == '#') {
        cols.push_back(j);
        break;
      }
  }
  if ((int)rows.size() > 4 || (int)cols.size() > 4) {
    vector<int> r;
    r.push_back(rows[0]);
    r.push_back(rows[1]);
    r.push_back(rows[(int)rows.size() - 2]);
    r.push_back(rows[(int)rows.size() - 1]);
    vector<int> c;
    c.push_back(cols[0]);
    c.push_back(cols[1]);
    c.push_back(cols[(int)cols.size() - 2]);
    c.push_back(cols[(int)cols.size() - 1]);
    rows = r;
    cols = c;
  }
  vector<pair<pair<int, int>, pair<int, int> > > rects;
  for (int top = (0); top < (((int)rows.size())); ++top)
    for (int bottom = (top + 1); bottom < ((int)rows.size()); ++bottom) {
      for (int left = (0); left < (((int)cols.size())); ++left)
        for (int right = (left + 1); right < ((int)cols.size()); ++right) {
          int const y1 = rows[top];
          int const y2 = rows[bottom];
          int const x1 = cols[left];
          int const x2 = cols[right];
          int const hborder = x2 - x1 + 1;
          int const vborder = y2 - y1 + 1;
          if (hborder < 3 || vborder < 3) continue;
          bool fullBorders = true;
          fullBorders &= hborder == prows[y1][x2 + 1] - prows[y1][x1 - 1 + 1];
          fullBorders &= hborder == prows[y2][x2 + 1] - prows[y2][x1 - 1 + 1];
          fullBorders &= vborder == pcols[x1][y2 + 1] - pcols[x1][y1 - 1 + 1];
          fullBorders &= vborder == pcols[x2][y2 + 1] - pcols[x2][y1 - 1 + 1];
          if (fullBorders) {
            rects.push_back(pair<pair<int, int>, pair<int, int> >(
                make_pair(x1, y1), make_pair(x2, y2)));
          }
        }
    }
  for (int i = (0); i < (((int)rects.size())); ++i)
    for (int j = (0); j < (((int)rects.size())); ++j)
      if (i <= j) {
        pair<pair<int, int>, pair<int, int> > const& first = rects[i];
        pair<pair<int, int>, pair<int, int> > const& second = rects[j];
        for (int pi = (0); pi < ((n)); ++pi)
          for (int pj = (0); pj < ((m)); ++pj)
            if (paper[pi][pj] == '#') {
              bool const onBorder =
                  isOnBorder(pj, pi, first) || isOnBorder(pj, pi, second);
              if (!onBorder) goto next;
            }
        cout << "YES\n";
        printRect(first);
        printRect(second);
        return 0;
      next:
        continue;
      }
  cout << "NO\n";
  return 0;
}