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

/**
 * Codeforces Round #108 (Div. 2), D
 * @author Roman Kosenko <madkite@gmail.com>
 */
public class C152D_Frames {
	public static void main(String... args) throws IOException {
		long time = 0;
		if(args.length != 0) {
			System.setIn(new FileInputStream(args[0]));
			time = System.currentTimeMillis();
		} else if(!Boolean.parseBoolean(System.getProperty("ONLINE_JUDGE"))) {
			//main("in/C152D.1.txt");
			//main("in/C152D.2.txt");
			main("input.txt");
			return;
		}
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ss = br.readLine().split(" ");
		int n = Integer.parseInt(ss[0]), m = Integer.parseInt(ss[1]);
		boolean a[][] = new boolean[n][m];
		for(int i = 0; i < n; i++) {
			String s = br.readLine();
			for(int j = 0; j < m; j++)
				a[i][j] = s.charAt(j) == '#';
		}

		int[][] result = solve(a);

		if(result == null)
			System.out.println("NO");
		else {
			System.out.println("YES");
			for(int i = 0; i < result[0].length; i++)
				result[0][i]++;
			if(result[0] != result[1]) {
				for(int i = 0; i < result[1].length; i++)
					result[1][i]++;
			}
			System.out.println(Arrays.toString(result[0]).replaceAll("[\\[\\],]", ""));
			System.out.println(Arrays.toString(result[1]).replaceAll("[\\[\\],]", ""));
		}

		if(time != 0)
			System.out.println(System.currentTimeMillis() - time);
	}

	private static int[][] solve(final boolean a[][]) {
		final int n = a.length, m = a[0].length;
		NavigableSet<Integer> bx = new TreeSet<Integer>();
		for(int i = 0; i < n ; i++) {
			for(int j = 0; j < m - 2; j++)
				if(a[i][j] && a[i][j + 1] && a[i][j + 2])
					bx.add(i);
		}
		NavigableSet<Integer> by = new TreeSet<Integer>();
		for(int j = 0; j < m; j++) {
			for(int i = 0; i < n - 2 ; i++)
				if(a[i][j] && a[i + 1][j] && a[i + 2][j])
					by.add(j);
		}
		if(bx.size() < 2 || by.size() < 2)
			return null;
		Iterator<Integer> it = bx.iterator();
		int bx1 = it.next(), bx2 = it.next(), bx3 = bx.size() > 2 ? it.next() : -1;
		it = by.iterator();
		int by1 = it.next(), by2 = it.next(), by3 = by.size() > 2 ? it.next() : -1;
		it = bx.descendingIterator();
		int bx6 = it.next(), bx5 = it.next(), bx4 = bx.size() > 2 ? it.next() : -1;
		it = by.descendingIterator();
		int by6 = it.next(), by5 = it.next(), by4 = by.size() > 2 ? it.next() : -1;

		List<int[]> c1 = new ArrayList<int[]>(n * m / 4);
		for(int i = 0; i < n - 2; i++)
			for(int j = 0; j < m - 2; j++)
				if(a[i][j] && a[i + 1][j] && a[i][j + 1] && a[i + 2][j] && a[i][j + 2]  && (bx1 == i || bx2 == i || bx3 == i) && (by1 == j || by2 == j || by3 == j))
					c1.add(new int[]{i, j});
		List<int[]> c2 = new ArrayList<int[]>(n * m / 4);
		for(int i = 2; i < n; i++)
			for(int j = 2; j < m; j++)
				if(a[i][j] && a[i - 1][j] && a[i][j - 1] && a[i - 2][j] && a[i][j - 2] && (bx6 == i || bx5 == i || bx4 == i) && (by6 == j || by5 == j || by4 == j))
					c2.add(new int[]{i, j});

		List<int[]> r = new ArrayList<int[]>(27);
		for(int[] a1 : c1) {
			loop: for(int[] a2 : c2) {
				if(a2[0] < a1[0] + 2 || a2[1] < a1[1] + 2)
					continue;
				for(int i = a1[0]; i <= a2[0]; i++)
					if(!a[i][a1[1]] || !a[i][a2[1]])
						continue loop;
				for(int i = a1[1]; i <= a2[1]; i++)
					if(!a[a1[0]][i] || !a[a2[0]][i])
						continue loop;
				if(r.size() == 27)
					return null;
				r.add(new int[]{a1[0], a1[1], a2[0], a2[1]});
			}
		}

		boolean b[][] = new boolean[n][m];
		for(int i1 = 0; i1 < r.size(); i1++) {
			int[] r1 = r.get(i1);
			loop: for(int i2 = i1; i2 < r.size(); i2++) {
				int[] r2 = r.get(i2);
				for(int i = 0; i < n; i++)
					System.arraycopy(a[i], 0, b[i], 0, m);
				for(int i = r1[0]; i <= r1[2]; i++)
					b[i][r1[1]] = b[i][r1[3]] = false;
				for(int i = r1[1]; i <= r1[3]; i++)
					b[r1[0]][i] = b[r1[2]][i] = false;
				for(int i = r2[0]; i <= r2[2]; i++)
					b[i][r2[1]] = b[i][r2[3]] = false;
				for(int i = r2[1]; i <= r2[3]; i++)
					b[r2[0]][i] = b[r2[2]][i] = false;
				for(int i = 0; i < n; i++)
					for(int j = 0; j < m; j++)
						if(b[i][j])
							continue loop;
				return new int[][] {r1, r2};
			}
		}
		return null;
	}
}