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 check(vector<string> grid, pair<int, int> v1, pair<int, int> h1,
           pair<int, int> v2, pair<int, int> h2, int countC) {
  for (int j = v1.second; j <= v1.first; j++) {
    if (grid[h1.second][j] == '.' || grid[h1.first][j] == '.') return false;
    if (grid[h1.second][j] == '#') {
      countC--;
      grid[h1.second][j] = '-';
    }
    if (grid[h1.first][j] == '#') {
      countC--;
      grid[h1.first][j] = '-';
    }
  }
  for (int i = h1.second; i <= h1.first; i++) {
    if (grid[i][v1.second] == '.' || grid[i][v1.first] == '.') return false;
    if (grid[i][v1.second] == '#') {
      countC--;
      grid[i][v1.second] = '-';
    }
    if (grid[i][v1.first] == '#') {
      countC--;
      grid[i][v1.first] = '-';
    }
  }
  for (int j = v2.second; j <= v2.first; j++) {
    if (grid[h2.second][j] == '.' || grid[h2.first][j] == '.') return false;
    if (grid[h2.second][j] == '#') {
      countC--;
      grid[h2.second][j] = '-';
    }
    if (grid[h2.first][j] == '#') {
      countC--;
      grid[h2.first][j] = '-';
    }
  }
  for (int i = h2.second; i <= h2.first; i++) {
    if (grid[i][v2.second] == '.' || grid[i][v2.first] == '.') return false;
    if (grid[i][v2.second] == '#') {
      countC--;
      grid[i][v2.second] = '-';
    }
    if (grid[i][v2.first] == '#') {
      countC--;
      grid[i][v2.first] = '-';
    }
  }
  if (countC > 0) return false;
  return true;
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<string> grid(N);
  for (int i = 0; i < N; i++) cin >> grid[i];
  int countC = 0;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < M; j++)
      if (grid[i][j] == '#') countC++;
  vector<int> hor, ver;
  for (int i = 0; i < N; i++) {
    for (int j = 1; j < M - 1; j++) {
      if (grid[i][j - 1] == '#' && grid[i][j] == '#' && grid[i][j + 1] == '#') {
        hor.push_back(i);
        break;
      }
    }
  }
  for (int j = 0; j < M; j++) {
    for (int i = 1; i < N - 1; i++) {
      if (grid[i - 1][j] == '#' && grid[i][j] == '#' && grid[i + 1][j] == '#') {
        ver.push_back(j);
        break;
      }
    }
  }
  sort(ver.begin(), ver.end());
  sort(hor.begin(), hor.end());
  if (ver.size() > 4) {
    ver[2] = ver[ver.size() - 2];
    ver[3] = ver.back();
    ver.resize(4);
  }
  if (hor.size() > 4) {
    hor[2] = hor[hor.size() - 2];
    hor[3] = hor.back();
    hor.resize(4);
  }
  vector<pair<int, int> > horPairs, verPairs;
  for (int i = 0; i < hor.size(); i++)
    for (int j = i + 1; j < hor.size(); j++)
      if (abs(hor[i] - hor[j]) >= 2)
        horPairs.push_back(make_pair(max(hor[i], hor[j]), min(hor[i], hor[j])));
  for (int i = 0; i < ver.size(); i++)
    for (int j = i + 1; j < ver.size(); j++)
      if (abs(ver[i] - ver[j]) >= 2)
        verPairs.push_back(make_pair(max(ver[i], ver[j]), min(ver[i], ver[j])));
  for (int h1 = 0; h1 < horPairs.size(); h1++) {
    for (int h2 = 0; h2 < horPairs.size(); h2++) {
      for (int v1 = 0; v1 < verPairs.size(); v1++) {
        for (int v2 = 0; v2 < verPairs.size(); v2++) {
          if (check(grid, verPairs[v1], horPairs[h1], verPairs[v2],
                    horPairs[h2], countC)) {
            cout << "YES" << endl;
            cout << horPairs[h1].second + 1 << " " << verPairs[v1].second + 1
                 << " " << horPairs[h1].first + 1 << " "
                 << verPairs[v1].first + 1 << endl;
            cout << horPairs[h2].second + 1 << " " << verPairs[v2].second + 1
                 << " " << horPairs[h2].first + 1 << " "
                 << verPairs[v2].first + 1 << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}