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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Main().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");
	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		in.close();
		out.close();
	}
	
	int n, m;
	int map[][];
	int X[], Y[];
	TreeSet<Integer> tx = new TreeSet<Integer>();
	TreeSet<Integer> ty = new TreeSet<Integer>();
	int cntx[], cnty[];
	
	void solve() throws IOException{
		n = nextInt();
		m = nextInt();
		map = new int[n][m];
		cntx = new int[n];
		cnty = new int[m];
		for(int i = 0; i < n; i++){
			String s = nextToken();
			for(int j = 0; j < m; j++)
				if(s.charAt(j) != '.'){
					map[i][j] = 1;
					cntx[i]++;
					cnty[j]++;
				}
		}
		for(int k = 0; k < 2; k++){
			for(int i = 0; i < n; i++)
				if(cntx[i] > 2){
					cntx[i] = 0;
					tx.add(i);
					break;
				}
			for(int i = n - 1; i >= 0; i--)
				if(cntx[i] > 2){
					cntx[i] = 0;
					tx.add(i);
					break;
				}
			for(int j = 0; j < m; j++)
				if(cnty[j] > 2){
					cnty[j] = 0;
					ty.add(j);
					break;
				}
			for(int j = m - 1; j >= 0; j--)
				if(cnty[j] > 2){
					cnty[j] = 0;
					ty.add(j);
					break;
				}
		}
		{
			X = new int[tx.size()];
			int p = 0;
			for(int e : tx)
				X[p++] = e;
		}
		{
			Y = new int[ty.size()];
			int p = 0;
			for(int e : ty)
				Y[p++] = e;
		}
		

		for(int mx1 = 0; mx1 < (1 << X.length); mx1++)
			for(int my1 = 0; my1 < (1 << Y.length); my1++)
				for(int mx2 = 0; mx2 < (1 << X.length); mx2++)
					for(int my2 = 0; my2 < (1 << Y.length); my2++){
						if(!bc(mx1) || !bc(my1) || !bc(mx2) || !bc(my2)) continue;
//						if((mx1 | mx2) != (1 << X.length) - 1) continue;
//						if((my1 | my2) != (1 << Y.length) - 1) continue;
						R r1 = new R(mx1, my1);
						R r2 = new R(mx2, my2);
						if(((mx1 | mx2) & (1)) == 0 || ((mx1 | mx2) & (1 << (tx.size() - 1))) == 0) continue;
						if(((my1 | my2) & (1)) == 0 || ((my1 | my2) & (1 << (ty.size() - 1))) == 0) continue;
						if(!r1.chk() || !r2.chk()) continue;
						boolean f = true;
						ex: for(int i = 0; i < n; i++)
							for(int j = 0; j < m; j++){
								if(map[i][j] != 0 && !r1.inside(i, j) && !r2.inside(i, j)){
									f = false;
									break ex;
								}
								if(map[i][j] == 0 && (r1.inside(i, j) || r2.inside(i, j))){
									if(mx1 == 5 && my1 == 5 && mx2 == 9 && my2 == 9){
//										System.err.println("kekeke");
//										System.err.println(i + " " + j);
//										System.err.println(r1);
//										System.err.println(r1.inside(i, j));
									}
									f = false;
									break ex;
								}
							}
						if(f){
							out.println("YES");
							out.println((r1.rx[0] + 1) + " " + (r1.ry[0] + 1) + " " + (r1.rx[1] + 1) + " " + (r1.ry[1] + 1));
							out.println((r2.rx[0] + 1) + " " + (r2.ry[0] + 1) + " " + (r2.rx[1] + 1) + " " + (r2.ry[1] + 1));
							return;
						}
					}
//		System.err.println(tx);
//		System.err.println(ty);
		out.println("NO");
	}
	
	private boolean bc(int m) {
		int bc = Integer.bitCount(m);
		if(bc == 0 || bc > 2) return false;
		return true;
	}

	class R{
		int rx[];
		int ry[];
		R(int mx,int my){
			rx = new int[2];
			ry = new int[2];
			int cx = 0, cy = 0;
			for(int i = 0; i < 10; i++)
				if((mx & (1 << i)) != 0)
					rx[cx++] = X[i];
			if(cx == 0)
				for(int i = 0; i < 10; i++)
					if((mx & (1 << i)) != 0)
						rx[cx++] = X[i];
			for(int j = 0; j < 10; j++)
				if((my & (1 << j)) != 0)
					ry[cy++] = Y[j];
			if(cy == 0)
				for(int j = 0; j < 10; j++)
					if((my & (1 << j)) != 0)
						ry[cy++] = Y[j];
		}
		boolean inside(int px, int py){
			if(px == rx[0] || px == rx[1])
				return ry[0] <= py && py <= ry[1];
			if(py == ry[0] || py == ry[1])
				return rx[0] <= px && px <= rx[1];
			return false;
		}
		boolean chk(){
			return rx[1] - rx[0] >= 2 && ry[1] - ry[0] >= 2;
		}
		@Override
		public String toString() {
			return rx[0] + " " + ry[0] + "; " + rx[1] + " " + ry[1];
		}
	}

	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}