import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int H = sc.nextInt(); final int W = sc.nextInt(); boolean[][] fields = new boolean[H][W]; for(int i = 0; i < H; i++){ char[] inputs = sc.next().toCharArray(); for(int j = 0; j < W; j++){ fields[i][j] = inputs[j] == '#'; } } boolean[][] checked = new boolean[H][W]; for(int dy = -(H - 1); dy < H; dy++){ for(int dx = -(W - 1); dx < W; dx++){ if(dx == 0 && dy == 0){ continue; } for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ checked[i][j] = false; } } for(int y = 0; y < H; y++){ for(int x = 0; x < W; x++){ final int nx = x + dx; final int ny = y + dy; if(nx < 0 || nx >= W || ny < 0 || ny >= H){ continue; } if(checked[y][x] || checked[ny][nx]){ continue; } if(fields[y][x] && fields[ny][nx]){ checked[y][x] = checked[ny][nx] = true; } } } boolean found = false; boolean flg = true; for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(fields[i][j]){ found = true; } if(fields[i][j] && !checked[i][j]){ flg = false; } } } if(flg && found){ System.out.println("YES"); return; } } } System.out.println("NO"); } }