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 sun.security.provider.certpath.OCSP.RevocationStatus;

public class D
{
	String line;
	StringTokenizer inputParser;
	BufferedReader is;
	FileInputStream fstream;
	DataInputStream in;
	
	void openInput(String file)
	{

		if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
		else
		{
			try{
		
				
			fstream = new FileInputStream(file);
			in = new DataInputStream(fstream);
			is = new BufferedReader(new InputStreamReader(in));
			}catch(Exception e)
			{
				System.err.println(e);
			}
		}

	}
	
	void readNextLine()
	{
		try {
			line = is.readLine();
			inputParser = new StringTokenizer(line, " ");
			//System.err.println("Input: " + line);
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}	
		
	}
	
	int NextInt()
	{
		String n = inputParser.nextToken();
		int val = Integer.parseInt(n);
		
		//System.out.println("I read this number: " + val);
		return val;
	}
	
	String NextString()
	{
		String n = inputParser.nextToken();
		return n;
	}
	
	void closeInput()
	{
		try {
			is.close();
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}
			
	}
	
	
	public static void main(String [] argv)
	{
		String filePath=null;
		if(argv.length>0)filePath=argv[0];
		new D(filePath);
	}
	boolean [] [] p;
	int n,m;
	int MAXP=10;
	public D(String inputFile)
	{
		openInput(inputFile);
		
		

		readNextLine();
		n=NextInt();
		m=NextInt();
		p = new boolean [n][m];
		//test(new Point(1,326), new Point(3, 984), new Point(2,326), new Point(4,984));
		//if(true)return;
		for(int i=0; i<n; i++)
		{
			readNextLine();
			for(int j=0; j<m; j++)
				p[i][j]=(line.charAt(j)=='#');
		}
		
		ArrayList <Point> starts = new ArrayList <Point>();
		for(int i=0; i<n-2; i++)
		{
			int xx=0;
			for(int j=0; j<m-2; j++)
			{
				if(p[i][j]&&p[i+1][j]&&p[i+2][j]&&p[i][j+1]&&p[i][j+2]&&starts.size()<MAXP){xx++;starts.add(new Point(i,j));}
				if(xx>2)break;
			}
			if(starts.size()==MAXP)break;
		}
		ArrayList <Point> ends = new ArrayList <Point>();
		
		for(int i=n-1; i>1; i--)
		{
			int xx=0;
			for(int j=m-1; j>1; j--)
			{
				if(p[i][j]&&p[i-1][j]&&p[i-2][j]&&p[i][j-1]&&p[i][j-2]&&ends.size()<MAXP){xx++;ends.add(new Point(i,j));}
				if(xx>2)break;
			}
			if(ends.size()==MAXP)break;
		}
		boolean ok=false;
		int ids1=-1, ids2=-1, ide1=-1, ide2=-1;
		System.err.println(starts.size()+" "+ends.size());
		if(starts.size()<=MAXP&&ends.size()<=MAXP)
		{
			
			for(int i=0; i<starts.size(); i++)
			{
				Point s=starts.get(i);
				for(int j=0; j<ends.size(); j++)
				{
					Point e=ends.get(j);
					for(int ii=0; ii<starts.size(); ii++)
					{
						if(i*ii>0)continue;
						Point ss=starts.get(ii);
						for(int jj=0; jj<ends.size(); jj++)
						{
							if(j*jj>0)continue;
							Point ee=ends.get(jj);
							if(test(s,e,ss,ee))
							{
								ok=true;
								ids1=i;
								ide1=j;
								ids2=ii;
								ide2=jj;
							}
						}
					}
				}
			}
		}
		
		if(ok)
		{
			System.out.println("YES");
			System.out.println(starts.get(ids1).x+1+" "+(starts.get(ids1).y+1)+" "+(ends.get(ide1).x+1)+" "+(ends.get(ide1).y+1));
			System.out.println(starts.get(ids2).x+1+" "+(starts.get(ids2).y+1)+" "+(ends.get(ide2).x+1)+" "+(ends.get(ide2).y+1));
		}
		else System.out.println("NO");
		
        closeInput();		

	}
	
	boolean test(Point s, Point e, Point ss, Point ee) {
		boolean [] [] q = new boolean [n][m];
		if(e.x-s.x<2)return false;
		if(e.y-s.y<2)return false;
		if(ee.x-ss.x<2)return false;
		if(ee.y-ss.y<2)return false;
		for(int i=0; i<n; i++)
			for(int j=0; j<m; j++)
				q[i][j]=false;
		for(int i=s.x; i<=e.x; i++)
		{
			q[i][s.y]=true;
			q[i][e.y]=true;
			if(!p[i][s.y])return false;
			if(!p[i][e.y])return false;
		}
		for(int i=s.y; i<e.y; i++)
		{
			q[s.x][i]=true;
			q[e.x][i]=true;
			if(!p[s.x][i])return false;
			if(!p[e.x][i])return false;
		}
		
		for(int i=ss.x; i<=ee.x; i++)
		{
			q[i][ss.y]=true;
			q[i][ee.y]=true;
			if(!p[i][ss.y])return false;
			if(!p[i][ee.y])return false;
		}
		for(int i=ss.y; i<ee.y; i++)
		{
			q[ss.x][i]=true;
			q[ee.x][i]=true;
			if(!p[ss.x][i])return false;
			if(!p[ee.x][i])return false;
		}
		
		/*System.out.println(n+" "+m);
		for(int i=0; i<n; i++)
		{
			for(int j=0; j<m; j++)
				System.out.print(q[i][j]?'#':'.');
			System.out.println();
		}*/
				
		for(int i=0; i<n; i++)
			for(int j=0; j<m; j++)
				if(p[i][j]!=q[i][j])return false;
		
		return true;
	}

	private class Point
	{
		int x,y;
		public Point(int x, int y)
		{
			this.x=x;
			this.y=y;
		}
	}
	


	
}