import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); boolean[][] field = new boolean[h][w]; for (int i = 0; i < h; i++) { char[] arr = sc.next().toCharArray(); for (int j = 0; j < w; j++) { field[i][j] = (arr[j] == '#'); } } for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if (i == 0 && j == 0) { continue; } boolean[][] tmp = new boolean[h][]; for (int k = 0; k < h; k++) { tmp[k] = (boolean[])(field[k].clone()); } boolean flag = true; for (int a = 0; a < h && flag; a++) { for (int b = 0; b < w && flag; b++) { if (tmp[a][b]) { if (a + i >= h || b + j >= w || !tmp[a + i][b + j]) { flag = false; break; } tmp[a + i][b + j] = false; } } } if (flag) { System.out.println("YES"); return; } } } System.out.println("NO"); } }