import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); char[][] map = new char[H][]; for (int i = 0; i < map.length; i++) { map[i] = sc.next().toCharArray(); } int cnt = 0; for (int i = 0; i < map.length; i++) { for (int j = 0; j < map[i].length; j++) { if (map[i][j] == '#') { cnt++; } } } if (cnt % 2 == 1 || cnt == 0) { System.out.println("NO"); return; } for (int x = 1 - H; x < H; x++) { for (int y = 1 - W; y < W; y++) { if (x == 0 && y == 0) { continue; } if (check(x, y, map)) { System.out.println("YES"); return; } } } System.out.println("NO"); } static boolean check(int x, int y, char[][] origin) { char[][] map = new char[origin.length][origin[0].length]; for (int i = 0; i < map.length; i++) { for (int j = 0; j < map[i].length; j++) { map[i][j] = origin[i][j]; } } for (int i = 0; i < map.length; i++) { for (int j = 0; j < map[i].length; j++) { int h = i + x; int w = j + y; if (map[i][j] == '#') { if (h >= map.length || w >= map[i].length || h < 0 || w < 0 || map[h][w] != '#') { return false; } map[i][j] = '.'; map[h][w] = '.'; } } } return true; } }