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.util.List;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.util.Collections;
import java.io.InputStream;

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

class TaskD {
    public final int MAXN = 1000+10 ;
    int[][] rowSum = new int[ MAXN ][ MAXN + 1 ] ;
    int[][] colSum = new int[ MAXN ][ MAXN + 1 ] ;
    int totalSum = 0;

    public void solve(int testNumber, MyInputReader in, MyOutputWriter out) {

        int row = in.nextInt();
        int col = in.nextInt();
        String[] map = new String[ row + 10 ] ;

        ArrayList<Integer> X = new ArrayList<Integer>(), Y = new ArrayList<Integer>();
        
        for( int i = 0 ; i < row ; i ++ ){
            map[i] = in.next() ;
            rowSum[ i ][ 0 ] = 0 ;
            boolean isOk = false; 
                     
            for( int j = 0 ; j < col ; j ++ ){
                totalSum += (map[i].charAt( j ) == '#'?1:0);
                rowSum[i][j+1] = rowSum[ i ][ j ] + (map[i].charAt( j ) == '#'?1:0);
                if( j >= 2 && rowSum[ i ][ j+1 ] - rowSum[ i ][ j - 2] == 3 ){
                    isOk = true ;
                }
            }
            if( isOk ) X.add( i ) ;
        }
        
        for( int j = 0 ; j < col ; j ++ ){
            colSum[j][0] = 0 ;
            boolean isOk = false ;
            for( int i = 0 ; i < row ; i ++ ){
                colSum[j][i+1] = colSum[ j ][ i ] + (map[i].charAt( j ) == '#'?1:0);
                if( i >= 2 && colSum[j][i+1] - colSum[j][i-2] == 3 ){
                    isOk = true;
                }
            }
            if( isOk ) Y.add( j ) ;
        }
        Collections.sort( X );
        Collections.sort( Y );

        while ( X.size() > 4 )X.remove( 2 );
        while ( Y.size() > 4 )Y.remove( 2 );
        //if( check_col_ok( 4 , 0 , 3) ) out.printLine("Yes");
        //if( check_ok( 0 , 0 ,3 , 4) ) out.printLine("Yes");
        //if( check_ok( 0 , 0 ,2 , 2) ) out.printLine("Yes");
        //if( check_ok_all( 0 , 0 , 3 , 4 , 0 , 0 , 2, 2 ) ) out.printLine("ok");
        //System.out.printf("%d %d\n",colSum[3][4] , colSum[3][0]);
        //out.printLine( colSum[3][0] , colSum[3][1],colSum[3][2],colSum[3][3],colSum[3][4],colSum[3][5]);
        //return;
        for( int flx : X )for( int fly : Y ){
            for( int frx : X ){
                if( frx - flx < 2 )continue;
                for( int fry : Y ){
                    if( fry - fly < 2 )continue;
                    if( !check_ok( flx , fly , frx , fry ) )continue;
                    for( int slx : X )for( int sly : Y ) {
                        for (int srx : X) {
                            if (srx - slx < 2) continue;
                            for (int sry : Y) {
                                if (sry - sly < 2) continue;
                                if (!check_ok(slx, sly, srx, sry)) continue;
                                if (check_ok_all(flx, fly, frx, fry, slx, sly, srx, sry)) {
                                    out.printLine("YES");
                                    out.printLine(flx+1, fly+1, frx+1, fry+1);
                                    out.printLine(slx+1, sly+1, srx+1, sry+1);
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
        out.printLine("NO");
    }

    public boolean check_ok_all(int flx, int fly, int frx, int fry, int slx, int sly, int srx, int sry) {
        int intersectNum = 0 ;
        intersectNum += get_row_inter(flx , fly , fry , slx ,sly , srx, sry ) + get_row_inter(frx , fly , fry , slx ,sly , srx,
                sry ) + get_col_inter(fly , flx+1, frx-1, slx, sly, srx, sry) + get_col_inter(fry , flx+1, frx-1, slx, sly, srx, sry);
        //System.out.printf("%d %d %d %d\n",get_total_num(flx,fly,frx,fry) , get_total_num(slx,sly,srx,sry) , intersectNum , totalSum);
        return get_total_num(flx,fly,frx,fry) + get_total_num(slx,sly,srx,sry) - intersectNum == totalSum ;
    }

    private int get_total_num(int flx, int fly, int frx, int fry) {
        return ( frx - flx + fry - fly ) * 2;
    }

    private int get_col_inter(int fly, int flx, int frx, int slx, int sly, int srx, int sry) {
           return get_col_row( fly, flx,frx,slx,sly,sry) +
                  get_col_row( fly, flx,frx,srx,sly,sry) +
                  get_col_col(fly, flx, frx, sly, slx + 1, srx - 1) +
                  get_col_col(fly, flx, frx, sry, slx + 1, srx - 1) ;
    }

    private int get_col_col(int fly, int flx, int frx, int sly, int slx, int srx) {
        if( fly != sly )return 0;
        return Math.max( 0 , Math.min( srx,frx) - Math.max(slx,flx) + 1);
    }

    private int get_col_row(int fly, int flx, int frx, int srx, int sly, int sry) {
        if( srx >= flx && srx <= frx && fly >= sly && fly <= sry )return 1;
        return 0;
    }

    private int get_row_inter(int flx, int fly, int fry, int slx, int sly, int srx, int sry) {

            return get_col_row(sly , slx+1,srx-1,flx,fly,fry) +
                get_col_row( sry , slx+1,srx-1,flx,fly,fry) +
                get_row_row( flx,fly,fry,slx,sly,sry) +
                get_row_row( flx,fly,fry,srx,sly,sry) ;
    }

    private int get_row_row(int flx, int fly, int fry, int slx, int sly, int sry) {
        if( flx != slx )return 0;
        return Math.max( 0 , Math.min( fry , sry ) - Math.max( fly ,sly ) + 1) ;
    }

    private boolean check_ok(int flx, int fly, int frx, int fry) {
        return check_row_ok( flx , fly , fry ) && check_row_ok( frx , fly , fry )
              && check_col_ok( fly, flx, frx ) && check_col_ok( fry ,flx , frx );
    }

    private boolean check_col_ok(int fry, int flx, int frx) {
        //System.out.printf("%d %d %d %d %d\n",colSum[fry][frx+1] , colSum[fry][flx] , fry , flx, frx);
        return colSum[fry][frx+1] -colSum[fry][flx] == frx - flx + 1 ;
    }

    private boolean check_row_ok(int flx, int fly, int fry) {
        return rowSum[flx][fry+1]-rowSum[flx][fly] == fry - fly + 1 ;
    }
}

class MyInputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public MyInputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    
    }

class MyOutputWriter {
    private final PrintWriter writer;

    public MyOutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public MyOutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}