public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int H = sc . nextInt ( ) ;
  int W = sc . nextInt ( ) ;
  boolean [ ] [ ] s = new boolean [ H ] [ W ] ;
  for ( int i = 0 ;
  i < H ;
  i ++ ) {
    String str = sc . next ( ) ;
    for ( int j = 0 ;
    j < W ;
    j ++ ) {
      s [ i ] [ j ] = str . charAt ( j ) == '#' ? true : false ;
    }
  }
  boolean isOk = true ;
  loop : for ( int i = 0 ;
  i < H ;
  i ++ ) {
    for ( int j = 0 ;
    j < W ;
    j ++ ) {
      if ( s [ i ] [ j ] ) {
        boolean tmpIsOk = false ;
        for ( int k = 0 ;
        k < 4 ;
        k ++ ) {
          int ni = i + dx [ k ] ;
          int nj = j + dy [ k ] ;
          if ( ni >= 0 && ni < H && nj >= 0 && nj < W && s [ ni ] [ nj ] ) {
            tmpIsOk = true ;
          }
        }
        if ( ! tmpIsOk ) {
          isOk = false ;
          break loop ;
        }
      }
    }
  }
  if ( isOk ) {
    out . println ( "Yes" ) ;
  }
  else {
    out . println ( "No" ) ;
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int H = sc . nextInt ( ) ; int W = sc . nextInt ( ) ; boolean [ ] [ ] s = new boolean [ H ] [ W ] ; for ( int i = 0 ; i < H ; i ++ ) { String str = sc . next ( ) ; for ( int j = 0 ; j < W ; j ++ ) { s [ i ] [ j ] = str . charAt ( j ) == ' # ' ? true : false ; } } boolean isOk = true ; loop : for ( int i = 0 ; i < H ; i ++ ) { for ( int j = 0 ; j < W ; j ++ ) { if ( s [ i ] [ j ] ) { boolean tmpIsOk = false ; for ( int k = 0 ; k < 4 ; k ++ ) { int ni = i + dx [ k ] ; int nj = j + dy [ k ] ; if ( ni >= 0 && ni < H && nj >= 0 && nj < W && s [ ni ] [ nj ] ) { tmpIsOk = true ; } } if ( ! tmpIsOk ) { isOk = false ; break loop ; } } } } if ( isOk ) { out . println ( " Yes " ) ; } else { out . println ( " No " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (boolean_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (ternary_expression condition: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)) consequence: (true) alternative: (false)))))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (labeled_statement (identifier) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))) consequence: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (identifier))) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (false))) (break_statement (identifier))))))))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))))))