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;
long long fpm(long long b, long long e, long long m) {
  long long t = 1;
  for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0;
  return t;
}
template <class T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class edge>
struct Graph {
  vector<vector<edge> > adj;
  Graph(int n) {
    adj.clear();
    adj.resize(n + 5);
  }
  Graph() { adj.clear(); }
  void resize(int n) { adj.resize(n + 5); }
  void add(int s, edge e) { adj[s].push_back(e); }
  void del(int s, edge e) { adj[s].erase(find(iter(adj[s]), e)); }
  int deg(int v) { return adj[v].size(); }
  vector<edge> &operator[](int t) { return adj[t]; }
};
const int maxn = 1100;
vector<pair<int, int> > ans, dots;
pair<int, int> p[4];
vector<int> xs, ys;
int ox[5], oy[5];
char S[maxn][maxn];
bool cover_all() {
  int cirA = 2 * (p[1].first + p[1].second - p[0].first - p[0].second + 0);
  int cirB = 2 * (p[3].first + p[3].second - p[2].first - p[2].second + 0);
  for (auto &z : dots) {
    bool b = false;
    if (((z.first == p[0].first || z.first == p[1].first) &&
         p[0].second <= z.second && z.second <= p[1].second) ||
        ((z.second == p[0].second || z.second == p[1].second) &&
         p[0].first <= z.first && z.first <= p[1].first))
      b = true, --cirA;
    if (((z.first == p[2].first || z.first == p[3].first) &&
         p[2].second <= z.second && z.second <= p[3].second) ||
        ((z.second == p[2].second || z.second == p[3].second) &&
         p[2].first <= z.first && z.first <= p[3].first))
      b = true, --cirB;
    if (!b) return false;
  }
  return !cirA && !cirB;
}
void dfs(int d) {
  if ((int)((ans).size())) return;
  if (d == 4) {
    if (p[1].first - p[0].first < 2 || p[1].second - p[0].second < 2) return;
    if (p[3].first - p[2].first < 2 || p[3].second - p[2].second < 2) return;
    if (!cover_all()) return;
    ans = vector<pair<int, int> >(p, p + 4);
    return;
  }
  for (int i = 0; i < (int)((xs).size()); ++i)
    for (int j = 0; j < (int)((ys).size()); ++j) {
      ++ox[i], ++oy[j];
      p[d] = make_pair(xs[i], ys[j]), dfs(d + 1);
      --ox[i], --oy[j];
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> (S[i] + 1);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (S[i][j] == '#') {
        if (j != 1 && j != m && S[i][j - 1] == '#' && S[i][j + 1] == '#')
          xs.push_back(i);
        if (i != 1 && i != m && S[i + 1][j] == '#' && S[i - 1][j] == '#')
          ys.push_back(j);
        dots.push_back(make_pair(i, j));
      }
  sort((ys).begin(), (ys).end());
  xs.resize(unique((xs).begin(), (xs).end()) - xs.begin());
  ys.resize(unique((ys).begin(), (ys).end()) - ys.begin());
  if ((int)((xs).size()) > 4) xs.erase(++ ++xs.begin(), -- --xs.end());
  if ((int)((ys).size()) > 4) ys.erase(++ ++ys.begin(), -- --ys.end());
  ({}), ({});
  dfs(0);
  if ((int)((ans).size()) == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl
         << ans[0].first << " " << ans[0].second << " " << ans[1].first << " "
         << ans[1].second << endl
         << ans[2].first << " " << ans[2].second << " " << ans[3].first << " "
         << ans[3].second << endl;
  return 0;
}