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.*;

public class D {

	public D () throws IOException {
		N = sc.nextInt();
		M = sc.nextInt();
		C = new char [N][];
		for (int n = 0; n < N; ++n)
			C[n] = sc.next().toCharArray();
		solve();
	}
	
	char SIGN = '#';
	char [][] C;
	int N, M, S, INF = 1000000;

	void count() {
		for (int n = 0; n < N; ++n)
			for (int m = 0; m < M; ++m)
				if (C[n][m] == SIGN)
					++S;
		if (S > 8000)
			no();
	}

	int [] R3, C3;
	
	void rows() {
		List<Integer> r = new ArrayList<Integer>();
		for (int n = 0; n < N; ++n)
			for (int m = 1; m < M-1; ++m) {
				if (C[n][m-1] == SIGN && C[n][m] == SIGN && C[n][m+1] == SIGN) {
					r.add(n);
					break;
				}
			}
		R3 = new int[r.size()];
		for (int i = 0; i < R3.length; ++i)
			R3[i] = r.get(i);
	}
	
	void columns() {
		List<Integer> c = new ArrayList<Integer>();
		for (int m = 0; m < M; ++m)
			for (int n = 1; n < N-1; ++n) {
				if (C[n-1][m] == SIGN && C[n][m] == SIGN && C[n+1][m] == SIGN) {
					c.add(m);
					break;
				}
			}
		C3 = new int[c.size()];
		for (int i = 0; i < C3.length; ++i)
			C3[i] = c.get(i);
	}
	
	public void solve () {
		start();
		count();
		rows();
		columns();
		
		int H = Math.min(3, R3.length), W = Math.min(3, C3.length);
		
		int [][] T = new int [H*W][];
		for (int h = 0; h < H; ++h)
			for (int w = 0; w < W; ++w)
				T[W*h+w] = new int [] { R3[h], C3[w] };

		int [][] B = new int [H*W][];
		for (int h = 0; h < H; ++h)
			for (int w = 0; w < W; ++w)
				B[W*h+w] = new int [] { R3[R3.length-H+h], C3[C3.length-W+w] };
		
		for (int t1 = 0; t1 < H*W; ++t1)
			for (int t2 = t1; t2 < H*W; ++t2)
				for (int b1 = 0; b1 < H*W; ++b1)
					for (int b2 = 0; b2 < H*W; ++b2)
						test(T[t1],B[b1],T[t2],B[b2]);
		
		no();
	}

	void no () {
		print("NO");
	}

	int size(int [] T1, int [] B1, int [] T2, int [] B2) {
		int res = rsz(T1, B1) + rsz (T2, B2);
		if (res < 0)
			return -INF;
		
		for(int i = 0; i < 2; ++i) {
			int d = 0, e = 0, j = 1-i;
			if (T2[i] == T1[i] || T2[i] == B1[i] || B2[i] == T1[i] || B2[i] == B1[i]) {
				int u = Math.max(T1[j], T2[j]), v = Math.min(B1[j], B2[j]);
				d = v-u+1;
				if (T2[i] == T1[i] && B2[i] == B1[i])
					d *= 2;
				d = Math.max(d, 0);
			}
			boolean L1 = T2[i] > T1[i] && T2[i] < B1[i], L2 = B2[i] > T1[i] && B2[i] < B1[i];
			if (L1 || L2) {
				if (T1[j] > T2[j] && T1[j] < B2[j])
					++e;
				if (B1[j] > T2[j] && B1[j] < B2[j])
					++e;
				if (L1 && L2)
					e *= 2;
			}
			res -= d+e;
		}

		int [][] V1 = vertices(T1, B1), V2 = vertices(T2, B2);
		for (int i = 0; i < 4; ++i)
			for (int j = 0; j < 4; ++j)
				if (V1[i][0] == V2[j][0] && V1[i][1] == V2[j][1])
					++res;
		
		return res;
	}

	int [][] vertices(int [] T, int [] B) {
		return new int [][] { T, B, new int [] { T[0], B[1] }, new int [] { B[0], T[1] } };		
	}
	
	int rsz(int [] T, int [] B) {
		int sz = 0;
		for (int i = 0; i < T.length; ++i) {
			int d = B[i] - T[i];
			if (d < 2)
				return -INF;
			else 
				sz += d;
		}
		return 2*sz;
	}
	void test(int [] T1, int [] B1, int [] T2, int [] B2) {
		if (size(T1, B1, T2, B2) == S && rect(T1, B1) && rect(T2, B2)) {
			print2("YES");
			prec(T1, B1);
			prec(T2, B2);
			System.exit(0);
		}
	}

	void prec(int [] T, int [] B) {
		int [] Z = new int [] { T[0], T[1], B[0], B[1] };
		String res = "";
		for (int i = 0; i < 4; ++i)
			res += (Z[i]+1) + " ";
		print2(res.trim());
	}
	
	boolean rect(int [] T, int [] B) {
		for (int x = T[0]; x <= B[0]; ++x)
			if (C[x][T[1]] != SIGN || C[x][B[1]] != SIGN)
				return false;
		for (int y = T[1]; y <= B[1]; ++y)
			if (C[T[0]][y] != SIGN || C[B[0]][y] != SIGN)
				return false;
		return true;
	}
	
	////////////////////////////////////////////////////////////////////////////////////

	static Scanner sc;
	static long t;
	
	static void print2 (Object o) {
		System.out.println(o);
	}
	
	static void print (Object o) {
		print2(o);
		//print2((millis() - t) / 1000.0);
		System.exit(0);
	}
	
	static void run () throws IOException {
		sc = new Scanner(System.in);
		new D();
	}
	
	public static void main(String[] args) throws IOException {
		run();
	}
	
	static long millis() {
		return System.currentTimeMillis();
	}
	
	static void start() {
		t = millis();
	}
}