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;
pair<int, int> point1[2005], point[2005];
int dy[6][2] = {{0, 0}, {0, 0}, {1, 0}, {2, 0}, {0, 1}, {0, 2}}, sum, sum1;
int cnt = 0, cnt1 = 0,
    dy1[6][2] = {{0, 0}, {0, 0}, {-1, 0}, {-2, 0}, {0, -1}, {0, -2}}, tot = 0;
int used[2005][2005];
char c[2005][2005];
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.first > b.first || (a.first == b.first && a.second > b.second);
}
int check(int a, int b) {
  if (point1[b].first - point[a].first < 2) return -0x3f3f3f;
  if (point1[b].second - point[a].second < 2) return -0x3f3f3f;
  int anss = 0;
  for (int i = point[a].first; i <= point1[b].first; i++) {
    if (c[i][point[a].second] == '.') return -0x3f3f3f;
    if (c[i][point1[b].second] == '.') return -0x3f3f3f;
    if (used[i][point[a].second] != tot) used[i][point[a].second] = tot, anss++;
    if (used[i][point1[b].second] != tot)
      used[i][point1[b].second] = tot, anss++;
  }
  for (int i = point[a].second; i <= point1[b].second; i++) {
    if (c[point[a].first][i] == '.') return -0x3f3f3f;
    if (c[point1[b].first][i] == '.') return -0x3f3f3f;
    if (used[point[a].first][i] != tot) used[point[a].first][i] = tot, anss++;
    if (used[point1[b].first][i] != tot) used[point1[b].first][i] = tot, anss++;
  }
  return anss;
}
void print(int a, int b) {
  printf("%d %d %d %d\n", point[a].first, point[a].second, point1[b].first,
         point1[b].second);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", c[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (c[i][j] == '#') sum++;
  int summ = 0;
  for (int i = 1; i <= n - 2; i++) {
    summ = 0;
    for (int j = 1; j <= m - 2; j++) {
      for (int k = 1; k <= 5; k++) {
        int nowx = i + dy[k][0], nowy = j + dy[k][1];
        if (c[nowx][nowy] == '.') goto syf;
      }
      summ++;
      point[++cnt] = make_pair(i, j);
    syf:
      i;
      if (summ >= 3) break;
    }
  }
  for (int i = 3; i <= n; i++) {
    summ = 0;
    for (int j = m; j >= 3; j--) {
      for (int k = 1; k <= 5; k++) {
        int nowx = i + dy1[k][0], nowy = j + dy1[k][1];
        if (c[nowx][nowy] == '.') goto syf1;
      }
      summ++;
      point1[++cnt1] = make_pair(i, j);
    syf1:
      i;
      if (summ >= 3) break;
    }
  }
  sort(point + 1, point + 1 + cnt);
  sort(point1 + 1, point1 + 1 + cnt1, cmp);
  for (int i = 1; i <= 6; i++)
    for (int j = 1; j <= 6; j++) {
      tot++;
      int k = check(i, j), k1 = check(1, 1);
      if (k + k1 == sum) {
        printf("YES\n");
        print(1, 1), print(i, j);
        exit(0);
      }
      tot++;
      k = check(1, j), k1 = check(i, 1);
      if (k + k1 == sum) {
        printf("YES\n");
        print(1, j), print(i, 1);
        exit(0);
      }
    }
  printf("NO\n");
  return 0;
}