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.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class Main{
    public static void main(String[]args){
        InputStream in = System.in;
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
        try{
//          in = new BufferedInputStream(new FileInputStream(new File("input.txt")));
//          out = new PrintWriter(new BufferedOutputStream(new FileOutputStream("output.txt")));
        }catch (Exception e) {
        }
        new Main().run(in,out);
        out.flush();
    }
    private void debug(Object...os){
        System.err.println(deepToString(os));
    }

    int h,w;
    char[][] cs;
    boolean[][] bs;
    private void run(InputStream in,PrintWriter out){
        h=nextInt(in);w=nextInt(in);
        cs=new char[h][];
        for (int i = 0; i < h; i++) {
            cs[i]=next(in).toCharArray();
        }
        bs=new boolean[h][w];
        for (int i = 0; i < h; i++) {
            for (int j = 0; j < w; j++) {
                bs[i][j] = cs[i][j]=='#';
            }
        }
//      int[] top=new int[2];
//      int[] bot=new int[2];
//      int[] lef=new int[2];
//      int[] rig=new int[2];
        int[] xx=new int[4];
        int[] yy=new int[4];
        
        int t;
        t=0;
        for (int i = 0; i < h; i++) {
            for(int j=0;j<w-2;j++){
                if(bs[i][j] && bs[i][j+1] && bs[i][j+2] && t<2){
                    xx[t++] = i;
                    break;
                }
            }
        }   
        t=3;
        for (int i = h-1; i >= 0; i--) {
            for(int j=0;j<w-2;j++){
                if(bs[i][j] && bs[i][j+1] && bs[i][j+2] && t>=2){
                    xx[t--] = i;
                    break;
                }
            }
        }
        t=0;
        for (int i = 0; i < w; i++) {
            for (int j = 0; j < h-2; j++) {
                if(bs[j][i] && bs[j+1][i] && bs[j+2][i] && t<2){
                    yy[t++] = i;
                    break;
                }
            }
        }       
        t=3;
        for (int i = w-1; i >= 0; i--) {
            for (int j = 0; j < h-2; j++) {
                if(bs[j][i] && bs[j+1][i] && bs[j+2][i] && t>=2){
                    yy[t--] = i;
                    break;
                }
            }
        }
        int cnt=0;
        for (int i = 0; i < h; i++) {
            for (int j = 0; j < w; j++) {
                if(bs[i][j])cnt++;
            }
        }
        int[][] f=new int[h][w];
        int c=1;
        boolean ok=false;
        loop:for(int x00:xx)for(int x01:xx)for(int y00:yy)for(int y01:yy){
            for(int x10:xx)for(int x11:xx)for(int y10:yy)for(int y11:yy){
                int val1=calc(f,x00,x01,y00,y01,c);
                int val2=calc(f,x10,x11,y10,y11,c);
                if(val1>=0 && val2>=0 && val1+val2==cnt){
                    out.println("YES");
                    out.printf("%d %d %d %d\n",x00+1,y00+1,x01+1,y01+1);
                    out.printf("%d %d %d %d\n",x10+1,y10+1,x11+1,y11+1);
                    ok=true;
                    break loop;
                }
                c++;
            }
        }
        if(!ok){
            out.println("NO");
        }
    }
    int calc(int[][] f,int x0,int x1,int y0,int y1,int c){
        if(x1-x0<2)return -1;
        if(y1-y0<2)return -1;
        int res=0;
        for(int i=x0;i<=x1;i++){
            if(!bs[i][y0])return -1;
            if(f[i][y0]!=c)res++;
            f[i][y0]=c;
        }
        for(int i=x0;i<=x1;i++){
            if(!bs[i][y1])return -1;
            if(f[i][y1]!=c)res++;
            f[i][y1]=c;
        }
        for(int j=y0;j<=y1;j++){
            if(!bs[x0][j])return -1;
            if(f[x0][j]!=c)res++;
            f[x0][j]=c;
        }
        for(int j=y0;j<=y1;j++){
            if(!bs[x1][j])return -1;
            if(f[x1][j]!=c)res++;
            f[x1][j]=c;
        }
        return res;
    }

    private String nextLine(InputStream in) {
        try {
            StringBuilder res = new StringBuilder("");
            int c = in.read();
            if(c==-1)return null;
            while (c=='\n' || c=='\r'){
                c = in.read();
                if(c==-1)return null;
            }
            do {
                res.append((char) c);
                c=in.read();
            } while (c!='\n' && c!='\r');
            return res.toString();
        } catch (Exception e) {
            return null;
        }
    }

    private String next(InputStream in) {
        try {
            StringBuilder res = new StringBuilder("");
            int c = in.read();
            if(c==-1)return null;
            while (Character.isWhitespace(c)){
                c = in.read();
                if(c==-1)return null;
            }
            do {
                res.append((char) c);
            } while (!Character.isWhitespace(c = in.read()));
            return res.toString();
        } catch (Exception e) {
            return null;
        }
    }

    private int nextInt(InputStream in){
        try{
            int c=in.read();
            if(c==-1) return c;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=in.read();
                if(c==-1) return c;
            }
            if(c=='-') return -nextInt(in);
            int res=0;
            do{
                res*=10;
                res+=c-'0';
                c=in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }

    private long nextLong(InputStream in){
        try{
            int c=in.read();
            if(c==-1) return c;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=in.read();
                if(c==-1) return c;
            }
            if(c=='-') return -nextLong(in);
            long res=0;
            do{
                res*=10;
                res+=c-'0';
                c=in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }
}