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;
struct __s {
  __s() {
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long n, m;
bool b[1111][1111];
long long bb, mm, M;
string s;
vector<pair<pair<long long, long long>, pair<long long, long long> > > ans;
vector<long long> second;
long long t;
long long c[1111][1111], d[1111][1111];
long long f(long long x, bool r) {
  long long res = 0;
  for (long long i = ans[x].first.first; i <= ans[x].second.first; i++) {
    if (b[i][ans[x].first.second] == !r) res++;
    if (b[i][ans[x].second.second] == !r) res++;
    b[i][ans[x].first.second] = r;
    b[i][ans[x].second.second] = r;
  }
  for (long long i = ans[x].first.second; i <= ans[x].second.second; i++) {
    if (b[ans[x].first.first][i] == !r) res++;
    if (b[ans[x].second.first][i] == !r) res++;
    b[ans[x].first.first][i] = r;
    b[ans[x].second.first][i] = r;
  }
  return res;
}
long long fm(long long x, long long y) { return 2 * (x + y - 2); }
void rec(long long i, long long j, long long x, long long y, long long dx,
         long long dy) {
  for (; x < n && y < m && x >= 0 && y >= 0 && b[x][y]; x += dx, y += dy) {
    if (dx == 0 && dy == 1) {
      if (b[x + 1][y] && abs(j - y) > 1) rec(i, j, x, y, 1, 0);
    } else {
      long long mmm = fm(abs(i - x) + 1, abs(j - y) + 1);
      if (abs(i - x) > 1 && c[x][y] <= j && d[x][j] <= i && b[x][y] &&
          bb - mmm <= mm) {
        ans.push_back(make_pair(make_pair(i, j), make_pair(x, y)));
        second.push_back(mmm);
        M = max(mmm, M);
      }
    }
  }
}
bool check(long long x, long long y) {
  if (bb == f(x, false) + f(y, false)) return true;
  f(x, true);
  f(y, true);
  return false;
}
void dp() {
  for (long long i = 0; i < (long long)(n); i++) {
    long long k = 0;
    for (long long j = 0; j < (long long)(m); j++) {
      if (!b[i][j])
        k = j + 1;
      else
        c[i][j] = k;
    }
  }
  for (long long i = 0; i < (long long)(m); i++) {
    long long k = 0;
    for (long long j = 0; j < (long long)(n); j++) {
      if (!b[j][i])
        k = j + 1;
      else
        d[j][i] = k;
    }
  }
}
int main(void) {
  cin >> n >> m;
  mm = fm(n, m);
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> s;
    for (long long j = 0; j < (long long)(m); j++) {
      if (s[j] == '#') {
        b[i][j] = true;
        bb++;
      }
    }
  }
  dp();
  for (long long i = 0; i < (long long)(n - 2); i++) {
    for (long long j = 0; j < (long long)(m - 2); j++) {
      if (b[i][j] && b[i + 1][j] && b[i + 2][j] && b[i][j + 1] && b[i][j + 2]) {
        rec(i, j, i, j, 0, 1);
      }
    }
  }
  for (long long i = 0; i < (long long)(ans.size()); i++) {
    if (bb - second[i] > M || (second[i] < M - 10 && ans.size() > 100))
      continue;
    for (long long j = i; j < ans.size(); j++) {
      if (second[j] < bb - second[i]) continue;
      if (check(i, j)) {
        cout << "YES" << '\n';
        cout << ans[i].first.first + 1 << " " << ans[i].first.second + 1 << " "
             << ans[i].second.first + 1 << " " << ans[i].second.second + 1
             << '\n';
        cout << ans[j].first.first + 1 << " " << ans[j].first.second + 1 << " "
             << ans[j].second.first + 1 << " " << ans[j].second.second + 1
             << '\n';
        return 0;
      }
    }
  }
  cout << "NO" << '\n';
  return 0;
}