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 double pi = acos(-1.0);
int r;
int c;
char bd[1024][1024];
set<pair<int, int> > used;
int cnt;
bool valid(int x1, int y1, int x2, int y2) {
  if (((x1 - x2) < 0 ? -(x1 - x2) : (x1 - x2)) < 2) return false;
  if (((y1 - y2) < 0 ? -(y1 - y2) : (y1 - y2)) < 2) return false;
  for (int y = y1; y <= y2; y++) {
    if (bd[x1][y] != '#') return false;
    if (bd[x2][y] != '#') return false;
    used.insert(make_pair(x1, y));
    used.insert(make_pair(x2, y));
  }
  for (int x = x1; x <= x2; x++) {
    if (bd[x][y1] != '#') return false;
    if (bd[x][y2] != '#') return false;
    used.insert(make_pair(x, y1));
    used.insert(make_pair(x, y2));
  }
  return true;
}
int main() {
  scanf("%d %d", &r, &c);
  for (int i = 0; i < r; i++) scanf("%s", bd[i]);
  cnt = 0;
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++)
      if (bd[i][j] == '#') ++cnt;
  vector<int> rows;
  for (int i = 0; i < r; i++) {
    bool ck = false;
    for (int j = 1; j < c; j++) {
      if (bd[i][j - 1] == '#' && bd[i][j] == '#') {
        ck = true;
        break;
      }
    }
    if (ck) rows.push_back(i);
  }
  vector<int> cols;
  for (int j = 0; j < c; j++) {
    bool ck = false;
    for (int i = 1; i < r; i++) {
      if (bd[i - 1][j] == '#' && bd[i][j] == '#') {
        ck = true;
        break;
      }
    }
    if (ck) cols.push_back(j);
  }
  if (rows.size() > 4) {
    rows[2] = rows[rows.size() - 2];
    rows[3] = rows[rows.size() - 1];
    rows.resize(4);
  }
  if (cols.size() > 4) {
    cols[2] = cols[cols.size() - 2];
    cols[3] = cols[cols.size() - 1];
    cols.resize(4);
  }
  int R = rows.size();
  int C = cols.size();
  for (int x1 = 0; x1 < R; x1++) {
    for (int x2 = x1; x2 < R; x2++) {
      for (int y1 = 0; y1 < C; y1++) {
        for (int y2 = y1; y2 < C; y2++) {
          for (int v1 = 0; v1 < R; v1++) {
            for (int v2 = v1; v2 < R; v2++) {
              for (int w1 = 0; w1 < C; w1++) {
                for (int w2 = w1; w2 < C; w2++) {
                  used.clear();
                  if (valid(rows[x1], cols[y1], rows[x2], cols[y2]) &&
                      valid(rows[v1], cols[w1], rows[v2], cols[w2]) &&
                      (int)used.size() == cnt) {
                    puts("YES");
                    printf("%d %d %d %d\n", rows[x1] + 1, cols[y1] + 1,
                           rows[x2] + 1, cols[y2] + 1);
                    printf("%d %d %d %d\n", rows[v1] + 1, cols[w1] + 1,
                           rows[v2] + 1, cols[w2] + 1);
                    return 0;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  puts("NO");
  return 0;
}