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;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
template <class T1, class T2, class T3>
inline void gn(T1 &x1, T2 &x2, T3 &x3) {
  gn(x1, x2), gn(x3);
}
template <class T1, class T2, class T3, class T4>
inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {
  gn(x1, x2), gn(x3, x4);
}
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
template <class T>
inline void println(T first) {
  print(first);
  putchar('\n');
}
template <class T>
inline void printsp(T first) {
  print(first);
  putchar(' ');
}
template <class T1, class T2>
inline void print(T1 x1, T2 x2) {
  printsp(x1), println(x2);
}
template <class T1, class T2, class T3>
inline void print(T1 x1, T2 x2, T3 x3) {
  printsp(x1), printsp(x2), println(x3);
}
template <class T1, class T2, class T3, class T4>
inline void print(T1 x1, T2 x2, T3 x3, T4 x4) {
  printsp(x1), printsp(x2), printsp(x3), println(x4);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
char s[1010][1010], a[1010][1010];
int first[1010], second[1010];
int nx, ny, n, m;
void solve(int xa, int xb, int xc, int xd, int ya, int yb, int yc, int yd) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      a[i][j] = s[i][j];
    }
  }
  for (int i = xa; i <= xb; i++) {
    if (s[i][ya] == '.' || s[i][yb] == '.') return;
    a[i][ya] = a[i][yb] = '.';
  }
  for (int i = ya; i <= yb; i++) {
    if (s[xa][i] == '.' || s[xb][i] == '.') return;
    a[xa][i] = a[xb][i] = '.';
  }
  for (int i = xc; i <= xd; i++) {
    if (s[i][yc] == '.' || s[i][yd] == '.') return;
    a[i][yc] = a[i][yd] = '.';
  }
  for (int i = yc; i <= yd; i++) {
    if (s[xc][i] == '.' || s[xd][i] == '.') return;
    a[xc][i] = a[xd][i] = '.';
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (a[i][j] == '#') {
        return;
      }
  }
  puts("YES");
  print(xa + 1, ya + 1, xb + 1, yb + 1);
  print(xc + 1, yc + 1, xd + 1, yd + 1);
  exit(0);
}
int main() {
  gn(n, m);
  for (int i = 0; i < n; i++) {
    scanf("%s", s[i]);
    for (int j = 0; j < m; j++)
      if (s[i][j] == '#' && s[i][j + 1] == '#' && s[i][j + 2] == '#') {
        first[nx++] = i;
        break;
      }
  }
  for (int j = 0; j < m; j++) {
    for (int i = 0; i < n; i++)
      if (s[i][j] == '#' && s[i + 1][j] == '#' && s[i + 2][j] == '#') {
        second[ny++] = j;
        break;
      }
  }
  if (nx > 4) {
    first[3] = first[--nx];
    first[2] = first[--nx];
    nx = 4;
  }
  if (ny > 4) {
    second[3] = second[--ny];
    second[2] = second[--ny];
    ny = 4;
  }
  for (int i1 = 0; i1 < nx; i1++) {
    for (int j1 = 0; j1 < ny; j1++) {
      for (int i2 = i1 + 1; i2 < nx; i2++)
        if (first[i1] + 2 <= first[i2]) {
          for (int j2 = j1 + 1; j2 < ny; j2++)
            if (second[j1] + 2 <= second[j2]) {
              for (int i3 = 0; i3 < nx; i3++) {
                for (int j3 = 0; j3 < ny; j3++) {
                  for (int i4 = i3 + 1; i4 < nx; i4++)
                    if (first[i3] + 2 <= first[i4]) {
                      for (int j4 = j3 + 1; j4 < ny; j4++)
                        if (second[j3] + 2 <= second[j4]) {
                          solve(first[i1], first[i2], first[i3], first[i4],
                                second[j1], second[j2], second[j3], second[j4]);
                        }
                    }
                }
              }
            }
        }
    }
  }
  puts("NO");
}