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 = 0; dy < H; dy++){ for(int dx = 0; 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 - dy; y++){ for(int x = 0; x < W - dx; x++){ final int nx = x + dx; final int ny = y + dy; if(checked[y][x] || checked[ny][nx]){ continue; } if(fields[y][x] && fields[ny][nx]){ checked[y][x] = checked[ny][nx] = true; } } } boolean flg = true; for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(fields[i][j] && !checked[i][j]){ flg = false; } } } if(flg){ System.out.println("YES"); return; } } } System.out.println("NO"); } }