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;
const int nmax = 1e3 + 5;
int rsum[nmax][nmax], csum[nmax][nmax];
vector<string> grid;
int n, m, sum;
vector<int> r_set, c_set;
struct line {
  int x0, y0, x1, y1;
  int area() {
    if (x0 > x1 || y0 > y1) return 0;
    int area = 0;
    if (x0 == x1)
      area = rsum[x1 + 1][y1 + 1] - rsum[x1 + 1][y0];
    else if (y0 == y1)
      area = csum[x1 + 1][y1 + 1] - csum[x0][y1 + 1];
    else
      assert(false);
    if (area != (x1 - x0 + 1) * (y1 - y0 + 1)) return nmax * nmax;
    return area;
  }
  line collide(line t) {
    line ans = *this;
    ans.x0 = max(ans.x0, x0);
    ans.x0 = max(ans.x0, t.x0);
    ans.x1 = min(ans.x1, x1);
    ans.x1 = min(ans.x1, t.x1);
    ans.y0 = max(ans.y0, y0);
    ans.y0 = max(ans.y0, t.y0);
    ans.y1 = min(ans.y1, y1);
    ans.y1 = min(ans.y1, t.y1);
    return ans;
  }
};
bool check(int x0, int x1, int x2, int x3, int y0, int y1, int y2, int y3) {
  if (x1 - x0 < 2 || x3 - x2 < 2 || y1 - y0 < 2 || y3 - y2 < 2) return false;
  vector<line> lines;
  lines.push_back({x0, y0, x1, y0});
  lines.push_back({x0, y0 + 1, x0, y1});
  lines.push_back({x1, y0 + 1, x1, y1});
  lines.push_back({x0 + 1, y1, x1 - 1, y1});
  lines.push_back({x2, y2, x3, y2});
  lines.push_back({x2, y2 + 1, x2, y3});
  lines.push_back({x3, y2 + 1, x3, y3});
  lines.push_back({x2 + 1, y3, x3 - 1, y3});
  int value = 0;
  for (int i = 0; i < lines.size(); ++i) value += lines[i].area();
  for (int i = 0; i < lines.size(); ++i)
    for (int j = i + 1; j < lines.size(); ++j)
      value -= (lines[i].collide(lines[j])).area();
  return value == sum;
}
int main() {
  cin >> n >> m;
  grid.resize(n);
  for (int i = 0; i < n; ++i) cin >> grid[i];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) {
      rsum[i + 1][j + 1] = rsum[i + 1][j];
      csum[i + 1][j + 1] = csum[i][j + 1];
      if (grid[i][j] == '#') {
        rsum[i + 1][j + 1]++;
        csum[i + 1][j + 1]++;
        sum++;
      }
    }
  for (int i = 2; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (grid[i][j] == '#' && grid[i - 1][j] == '#' && grid[i - 2][j] == '#')
        c_set.push_back(j);
  for (int i = 0; i < n; ++i)
    for (int j = 2; j < m; ++j)
      if (grid[i][j] == '#' && grid[i][j - 1] == '#' && grid[i][j - 2] == '#')
        r_set.push_back(i);
  sort(r_set.begin(), r_set.end());
  sort(c_set.begin(), c_set.end());
  r_set.resize(unique(r_set.begin(), r_set.end()) - r_set.begin());
  c_set.resize(unique(c_set.begin(), c_set.end()) - c_set.begin());
  if (r_set.size() > 4) r_set.erase(r_set.begin() + 2, r_set.end() - 2);
  if (c_set.size() > 4) c_set.erase(c_set.begin() + 2, c_set.end() - 2);
  int r = r_set.size(), c = c_set.size();
  for (int r0 : r_set)
    for (int r1 : r_set)
      for (int r2 : r_set)
        for (int r3 : r_set)
          for (int c0 : c_set)
            for (int c1 : c_set)
              for (int c2 : c_set)
                for (int c3 : c_set)
                  if (check(r0, r1, r2, r3, c0, c1, c2, c3)) {
                    cout << "YES\n";
                    cout << r0 + 1 << ' ' << c0 + 1 << ' ' << r1 + 1 << ' '
                         << c1 + 1 << '\n';
                    cout << r2 + 1 << ' ' << c2 + 1 << ' ' << r3 + 1 << ' '
                         << c3 + 1 << '\n';
                    return 0;
                  }
  cout << "NO\n";
}