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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Locale;
import java.util.StringTokenizer;

public class D {
	
	private void test() {
		
//		YES
//
//		1 326 3 984
//
//		2 326 4 984
	}

	private void solve() throws IOException {
//		int m = 500;
//		int n = 1001;
//		byte[][] a = new byte[m][n];
//		for (int i = 0; i < m; i++) {
//			for (int j = 0; j < n; j++) {
//				a[i][j] = '.';
//			}
//		}
//		
//		f(a, 214, 997, 241, 999, (byte)'.', (byte)'#');
//		f(a, 214, 998, 241, 1000, (byte)'.', (byte)'#');
		
		int m = nextInt();
		int n = nextInt();

		byte[][] a = new byte[m][];
		for (int i = 0; i < m; i++) {
			a[i] = nextToken().getBytes();
		}

		ArrayList<Integer> ux = new ArrayList<Integer>();
		ArrayList<Integer> uy = new ArrayList<Integer>();
		ArrayList<Integer> dx = new ArrayList<Integer>();
		ArrayList<Integer> dy = new ArrayList<Integer>();

		int[] cux = new int[m];
		int[] cdx = new int[m];
		int u = 0;
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				if (i < m - 2 && j < n - 2 && a[i][j] == '#'
						&& a[i + 1][j] == '#' && a[i][j + 1] == '#'
						&& a[i + 2][j] == '#' && a[i][j + 2] == '#' && cux[i] < 5) {
					ux.add(i);
					uy.add(j);
					cux[i]++;
				}
			}
			if (cux[i] > 0) {
				u++;
			}
			if (u == 4) {
				break;
			}
		}
		
		int d = 0;
		for (int i = m - 1; i > 1; i--) {
			for (int j = n - 1; j > 1; j--) {
				if (a[i][j] == '#' && a[i - 1][j] == '#'
						&& a[i][j - 1] == '#' && a[i - 2][j] == '#'
							&& a[i][j - 2] == '#' && cdx[i] < 5) {
					dx.add(i);
					dy.add(j);
					cdx[i]++;
				}
			}
			if (cdx[i] != 0) {
				d++;
			}
			if (d == 4) {
				break;
			}
		}

		if (ux.size() > 40 || dx.size() > 40) {
			println("NO");
			return;
		}
		
		int k = 0;
		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				if (a[i][j] == '#') {
					k++;
				}
			}
		}

		for (int i = 0; i < ux.size(); i++) {
			for (int j = 0; j < dx.size(); j++) {
				if (ux.get(i) + 2 <= dx.get(j) && uy.get(i) + 2 <= dy.get(j)) {
					for (int ii = 0; ii < ux.size(); ii++) {
						for (int jj = 0; jj < dx.size(); jj++) {
							if (ux.get(ii) + 2 <= dx.get(jj)
									&& uy.get(ii) + 2 <= dy.get(jj)) {
//								for (int x = 0; x < m; x++) {
//									for (int y = 0; y < n; y++) {
//										System.err.print((char)a[x][y]);
//									}
//									System.err.println();
//								}
								int k1 = f(a, ux.get(i), uy.get(i), dx.get(j), dy.get(j), (byte)'#', (byte)'a');
								int k2 = f(a, ux.get(ii), uy.get(ii), dx.get(jj), dy.get(jj), (byte)'#', (byte)'a');
								
//								System.err.println(k1 + " " + k2);
//								System.err.println((ux.get(i) + 1) + " " + (uy.get(i) + 1) + " " + (dx.get(j) + 1) + " " + (dy.get(j) + 1));
//								System.err.println((ux.get(ii) + 1) + " " + (uy.get(ii) + 1) + " " + (dx.get(jj) + 1) + " " + (dy.get(jj) + 1));
								if (k1 + k2 == k) {
									println("YES");
									println((ux.get(i) + 1) + " " + (uy.get(i) + 1) + " " + (dx.get(j) + 1) + " " + (dy.get(j) + 1));
									println((ux.get(ii) + 1) + " " + (uy.get(ii) + 1) + " " + (dx.get(jj) + 1) + " " + (dy.get(jj) + 1));
									return;
								}
								
								f(a, ux.get(ii), uy.get(ii), dx.get(jj), dy.get(jj), (byte)'a', (byte)'#');
								f(a, ux.get(i), uy.get(i), dx.get(j), dy.get(j), (byte)'a', (byte)'#');
							}
						}
					}
					
					
				}
			}
		}
		
		println("NO");
	}

	private int f(byte[][] a, int x1, int y1, int x2, int y2, byte c1, byte c2) {
		int res = 0;
		for (int i = x1; i <= x2; i++) {
			if (a[i][y1] == c1) {
				res++;
				a[i][y1] = c2;
			} else if (a[i][y1] == '.') {
				return 0;
			}

			if (a[i][y2] == c1) {
				res++;
				a[i][y2] = c2;
			} else if (a[i][y2] == '.') {
				return 0;
			}
		}

		for (int j = y1; j <= y2; j++) {
			if (a[x1][j] == c1) {
				res++;
				a[x1][j] = c2;
			} else if (a[x1][j] == '.') {
				return 0;
			}

			if (a[x2][j] == c1) {
				res++;
				a[x2][j] = c2;
			} else if (a[x2][j] == '.') {
				return 0;
			}
		}

		return res;
	}

	private String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

	private int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	private double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	private void print(Object o) {
		writer.print(o);
	}

	private void println(Object o) {
		writer.println(o);
	}

	private void printf(String format, Object... o) {
		writer.printf(format, o);
	}

	public static void main(String[] args) {
		long time = System.currentTimeMillis();
		Locale.setDefault(Locale.US);
		new D().run();
		System.err.printf("%.3f\n", 1e-3 * (System.currentTimeMillis() - time));
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	private void run() {
		try {
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(System.out);
			solve();
			reader.close();
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(13);
		}
	}
}