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>
namespace solution {
class SolutionInterface {
 public:
  virtual int run() = 0;

 protected:
  virtual void pre_calc() {}
  virtual bool action() = 0;
  virtual void init(){};
  virtual bool input() { return false; };
  virtual void output(){};
  SolutionInterface() {}

 private:
};
}  // namespace solution
namespace solution {
class SolutionBase : public SolutionInterface {
 public:
  virtual int run() {
    pre_calc();
    while (action())
      ;
    return 0;
  }
};
}  // namespace solution
namespace solution {}
namespace solution {
using namespace std;
}
namespace solution {
const int SIZE = 1000 + 11;
const string YES = "YES";
const string NO = "NO";
const char HATCHED = '#';
const char USED = '@';
const char EMPTY = '.';
int H, W;
string S[SIZE];
std::set<int> s_cand_r;
std::set<int> s_cand_c;
int cand_r[SIZE];
int cand_r_num;
int cand_c[SIZE];
int cand_c_num;
int hatched_num;
int used_num;
int ar1, ac1, ar2, ac2;
int br1, bc1, br2, bc2;
bool result;
}  // namespace solution
namespace solution {
class Solver {
 public:
  void solve() {
    hatched_num = calc_hatched_num();
    compress();
    result = has_two_rectangles();
  }
  int calc_hatched_num() {
    int res = 0;
    for (int i = 0; i < H; ++i) {
      for (int j = 0; j < W; ++j) {
        if (S[i][j] == HATCHED) {
          res++;
        }
      }
    }
    return res;
  }
  void compress() {
    for (int i = 0; i < H; ++i) {
      for (int j = 0; j < W; ++j) {
        if (S[i][j] != HATCHED) {
          continue;
        }
        if (has_three_hatched_cell_in_row(i, j)) {
          s_cand_r.insert(i);
        }
        if (has_three_hatched_cell_in_col(i, j)) {
          s_cand_c.insert(j);
        }
      }
    }
    if (s_cand_r.size() > 4) {
      s_cand_r.erase(++ ++s_cand_r.begin(), -- --s_cand_r.end());
    }
    if (s_cand_c.size() > 4) {
      s_cand_c.erase(++ ++s_cand_c.begin(), -- --s_cand_c.end());
    }
    std::copy(s_cand_r.begin(), s_cand_r.end(), cand_r);
    cand_r_num = s_cand_r.size();
    std::copy(s_cand_c.begin(), s_cand_c.end(), cand_c);
    cand_c_num = s_cand_c.size();
  }
  bool has_three_hatched_cell_in_row(int r, int c) {
    if (c - 1 < 0 || c + 1 >= W) {
      return false;
    }
    return S[r][c - 1] == HATCHED && S[r][c + 1] == HATCHED;
  }
  bool has_three_hatched_cell_in_col(int r, int c) {
    if (r - 1 < 0 || r + 1 >= H) {
      return false;
    }
    return S[r - 1][c] == HATCHED && S[r + 1][c] == HATCHED;
  }
  bool has_two_rectangles() {
    if (cand_r_num > 4 && cand_c_num > 4) {
      return false;
    }
    return has_two_rectangles_1();
  }
  bool has_two_rectangles_1() {
    for (int r1 = 0; r1 < cand_r_num; ++r1) {
      for (int c1 = 0; c1 < cand_c_num; ++c1) {
        for (int r2 = r1 + 1; r2 < cand_r_num; ++r2) {
          for (int c2 = c1 + 1; c2 < cand_c_num; ++c2) {
            ar1 = cand_r[r1], ac1 = cand_c[c1];
            ar2 = cand_r[r2], ac2 = cand_c[c2];
            if (ar2 - ar1 < 2 || ac2 - ac1 < 2) {
              continue;
            }
            if (has_two_rectangles_2()) {
              return true;
            }
          }
        }
      }
    }
    return false;
  }
  bool has_two_rectangles_2() {
    for (int r1 = 0; r1 < cand_r_num; ++r1) {
      for (int c1 = 0; c1 < cand_c_num; ++c1) {
        for (int r2 = r1 + 1; r2 < cand_r_num; ++r2) {
          for (int c2 = c1 + 1; c2 < cand_c_num; ++c2) {
            br1 = cand_r[r1], bc1 = cand_c[c1];
            br2 = cand_r[r2], bc2 = cand_c[c2];
            if (br2 - br1 < 2 || bc2 - bc1 < 2) {
              continue;
            }
            if (check(ar1, ac1, ar2, ac2) && check(br1, bc1, br2, bc2) &&
                used_num == hatched_num) {
              return true;
            }
            reset(ar1, ac1, ar2, ac2);
            reset(br1, bc1, br2, bc2);
          }
        }
      }
    }
    return false;
  }
  bool check(int r1, int c1, int r2, int c2) {
    if (r2 - r1 < 2 || c2 - c1 < 2) {
      return false;
    }
    for (int r = r1; r <= r2; ++r) {
      if (S[r][c1] == EMPTY || S[r][c2] == EMPTY) {
        return false;
      }
      if (S[r][c1] == HATCHED) {
        S[r][c1] = USED;
        used_num++;
      }
      if (S[r][c2] == HATCHED) {
        S[r][c2] = USED;
        used_num++;
      }
    }
    for (int c = c1; c <= c2; ++c) {
      if (S[r1][c] == EMPTY || S[r2][c] == EMPTY) {
        return false;
      }
      if (S[r1][c] == HATCHED) {
        S[r1][c] = USED;
        used_num++;
      }
      if (S[r2][c] == HATCHED) {
        S[r2][c] = USED;
        used_num++;
      }
    }
    return true;
  }
  void reset(int r1, int c1, int r2, int c2) {
    if (r2 - r1 < 2 || c2 - c1 < 2) {
      return;
    }
    for (int r = r1; r <= r2; ++r) {
      if (S[r][c1] == EMPTY || S[r][c2] == EMPTY) {
        return;
      }
      if (S[r][c1] == USED) {
        S[r][c1] = HATCHED;
        used_num--;
      }
      if (S[r][c2] == USED) {
        S[r][c2] = HATCHED;
        used_num--;
      }
    }
    for (int c = c1; c <= c2; ++c) {
      if (S[r1][c] == EMPTY || S[r2][c] == EMPTY) {
        return;
      }
      if (S[r1][c] == USED) {
        S[r1][c] = HATCHED;
        used_num--;
      }
      if (S[r2][c] == USED) {
        S[r2][c] = HATCHED;
        used_num--;
      }
    }
  }

 private:
};
}  // namespace solution
namespace solution {
class Solution : public SolutionBase {
 public:
 protected:
  virtual bool action() {
    init();
    if (!input()) return false;
    solver.solve();
    output();
    return true;
  }
  void init() {
    s_cand_r.clear();
    s_cand_c.clear();
    used_num = 0;
    cand_r_num = cand_c_num = 0;
  }
  bool input() {
    if (!(cin >> H >> W)) return false;
    for (int i = 0; i < H; ++i) {
      cin >> S[i];
    }
    return true;
  }
  void output() {
    cout << (result ? YES : NO) << endl;
    if (result) {
      cout << ar1 + 1 << " " << ac1 + 1 << " " << ar2 + 1 << " " << ac2 + 1
           << endl;
      cout << br1 + 1 << " " << bc1 + 1 << " " << br2 + 1 << " " << bc2 + 1
           << endl;
    }
  }

 private:
  Solver solver;
};
}  // namespace solution
int main() { return solution::Solution().run(); }