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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        char SIGN = '#';
        char[][] C;
        int N;
        int M;
        int T;
        int[][] vmust = {{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}};
        Set<Integer>[] vcan = new Set[4];
        PrintWriter out;

        public void solve(int testNumber, FastReader in, PrintWriter out) {
            this.out = out;
            N = in.nextInt();
            M = in.nextInt();
            C = new char[N][];
            for (int n = 0; n < N; ++n)
                C[n] = in.next().toCharArray();
            for (int i = 0; i < 4; ++i)
                vcan[i] = new HashSet<Integer>();


            testrc(N, M, 0, 1, false);
            testrc(M, N, 1, 0, true);

            /* Classify vertices */
            for (int n = 0; n < N; ++n)
                for (int m = 0; m < M; ++m)
                    checkv(n, m);

            int[] R1 = new int[2], R2 = new int[2];
            R1[0] = vmust[0][0];

            Integer[] T2 = vmust[0][1] >= 0 ? new Integer[]{vmust[0][1]} : vcan[0].toArray(new Integer[0]);
            Integer[] B = vmust[3][1] >= 0 ? new Integer[]{vmust[3][1]} : vcan[3].toArray(new Integer[0]);

            for (int t2 : T2) {
                R2[0] = t2;

                R1[1] = vmust[3][0];
                for (int b2 : B) {
                    if (b2 > t2) {
                        R2[1] = b2;
                        test(R1, R2);
                    }
                }

                R2[1] = vmust[3][0];
                for (int b1 : B) {
                    R1[1] = b1;
                    test(R1, R2);
                }
            }

            no();
        }

        void no() {
            out.println("NO");
            exit();
        }

        private void exit() {
            out.flush();
            out.close();
            System.exit(0);
        }

        void testrc(int N, int M, int du, int dv, boolean rev) {
            int cnt5 = 0;
            T = 0;
            for (int n = 0; n < N; ++n) {
                int cnt = 0, ch = 0;
                for (int m = 0; m < M; ++m) {
                    int u = n, v = m;
                    if (rev) {
                        u = m;
                        v = n;
                    }
                    if (s(u, v)) {
                        if ((++T) > 8000)
                            no();
                        if ((++cnt) == 5 && (++cnt5) == 5)
                            no();
                        if (s(u, v) != s(u - du, v - dv) && (++ch) == 9)
                            no();
                    }
                }
            }
        }

        int reduce(int px, int qx, int rx, int sx, int py, int qy, int ry, int sy) {
            int d = 0, e = 0;
            if (rx == px || rx == qx || sx == px || sx == qx) {
                int u = Math.max(py, ry), v = Math.min(qy, sy);
                d = v - u + 1;
                if (rx == px && sx == qx)
                    d *= 2;
                d = Math.max(d, 0);
            }
            boolean L1 = rx > px && rx < qx, L2 = sx > px && sx < qx;
            if (L1 || L2) {
                if (py > ry && py < sy)
                    ++e;
                if (qy > ry && qy < sy)
                    ++e;
                if (L1 && L2)
                    e *= 2;
            }
            return d + e;
        }

        void test(int[] R1, int[] R2) {
            int[] p = dekey(R1[0]), q = dekey(R1[1]), r = dekey(R2[0]), s = dekey(R2[1]);
            int px = p[0], py = p[1], qx = q[0], qy = q[1], rx = r[0], ry = r[1], sx = s[0], sy = s[1];

            int trr1 = key(px, qy), trr2 = key(rx, sy), blr1 = key(qx, py), blr2 = key(sx, ry);

            boolean res =
                    vtest(trr1, trr2, vmust[1]) &&
                            vtest(blr1, blr2, vmust[2]) &&
                            t3(p, q) && t3(r, s);

            if (!res)
                return;

            int sz = (qx - px + qy - py + sx - rx + sy - ry) * 2;

            sz -= reduce(px, qx, rx, sx, py, qy, ry, sy);
            sz -= reduce(py, qy, ry, sy, px, qx, rx, sx);

            int[] Q = new int[]{R1[0], R1[1], R2[0], R2[1], trr1, trr2, blr1, blr2};
            for (int i = 0; i < 8; ++i)
                for (int j = i + 1; j < 8; ++j)
                    if (Q[i] == Q[j])
                        ++sz;

            if (T != sz)
                return;

            if (rect(R1) && rect(R2)) {
                out.println("YES");
                ++px;
                ++py;
                ++qx;
                ++qy;
                ++rx;
                ++ry;
                ++sx;
                ++sy;
                out.println(px + " " + py + " " + qx + " " + qy);
                out.println(rx + " " + ry + " " + sx + " " + sy);
                exit();
            }
        }

        boolean rect(int[] R) {
            int[] p = dekey(R[0]), q = dekey(R[1]);
            int px = p[0], py = p[1], qx = q[0], qy = q[1];

            for (int x = px; x <= qx; ++x)
                if (!s(x, py) || !s(x, qy))
                    return false;
            for (int y = py; y <= qy; ++y)
                if (!s(px, y) || !s(qx, y))
                    return false;

            return true;
        }

        boolean t3(int[] p, int[] q) {
            return q[0] - p[0] > 1 && q[1] - p[1] > 1;
        }

        void checkv(int x, int y) {
            if (s(x, y))
                for (int i = 0; i < 4; ++i)
                    checkv(x, y, i);
        }

        void checkv(int x, int y, int p) {
            int dx = 1 - (p & 2), dy = 1 - 2 * (p & 1);
            boolean canv = s(x + dx, y) && s(x + 2 * dx, y), canh = s(x, y + dy) && s(x, y + 2 * dy);
            boolean musvh = !s(x - dx, y) && !s(x, y - dy), canvh = canv && canh;

            if (musvh && !canvh)
                no();
            if (canvh)
                vcan[p].add(key(x, y));
            if (musvh)
                madd(x, y, p);
        }

        void madd(int x, int y, int p) {
            int z = key(x, y);
            if (vmust[p][0] >= 0) {
                if (vmust[p][1] >= 0)
                    no();
                else
                    vmust[p][1] = z;
            } else
                vmust[p][0] = z;
        }

        int key(int x, int y) {
            return 1000 * x + y;
        }

        int[] dekey(int z) {
            return new int[]{z / 1000, z % 1000};
        }

        boolean s(int x, int y) {
            return x >= 0 && x < N && y >= 0 && y < M && C[x][y] == SIGN;
        }

        boolean vtest(int p, int q, int[] V) {
            for (int i = 0; i < V.length; ++i)
                if (p != V[i] && q != V[i] && V[i] >= 0)
                    return false;
            return true;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String next() {
            return nextString();
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = pread();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}