public static void process ( ) throws IOException {
  int n = ni ( ) ;
  int m = ni ( ) ;
  int a [ ] [ ] = new int [ n ] [ m ] ;
  int h [ ] [ ] = new int [ n ] [ m ] ;
  int v [ ] [ ] = new int [ n ] [ m ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    for ( int j = 0 ;
    j < m ;
    j ++ ) {
      a [ i ] [ j ] = ni ( ) ;
    }
  }
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    for ( int j = 0 ;
    j < m ;
    j ++ ) {
      if ( j == 0 ) {
        if ( a [ i ] [ j ] == 1 ) {
          h [ i ] [ j ] = 1 ;
        }
        else {
          h [ i ] [ j ] = 0 ;
        }
      }
      else {
        if ( a [ i ] [ j ] == 1 ) {
          h [ i ] [ j ] = h [ i ] [ j - 1 ] + 1 ;
        }
        else {
          h [ i ] [ j ] = h [ i ] [ j - 1 ] ;
        }
      }
    }
  }
  for ( int j = 0 ;
  j < m ;
  j ++ ) {
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      if ( i == 0 ) {
        if ( a [ i ] [ j ] == 1 ) {
          v [ i ] [ j ] = 1 ;
        }
        else {
          v [ i ] [ j ] = 0 ;
        }
      }
      else {
        if ( a [ i ] [ j ] == 1 ) {
          v [ i ] [ j ] = v [ i - 1 ] [ j ] + 1 ;
        }
        else {
          v [ i ] [ j ] = v [ i - 1 ] [ j ] ;
        }
      }
    }
  };
}

public static void process ( ) throws IOException { int n = ni ( ) ; int m = ni ( ) ; int a [ ] [ ] = new int [ n ] [ m ] ; int h [ ] [ ] = new int [ n ] [ m ] ; int v [ ] [ ] = new int [ n ] [ m ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { a [ i ] [ j ] = ni ( ) ; } } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( j == 0 ) { if ( a [ i ] [ j ] == 1 ) { h [ i ] [ j ] = 1 ; } else { h [ i ] [ j ] = 0 ; } } else { if ( a [ i ] [ j ] == 1 ) { h [ i ] [ j ] = h [ i ] [ j - 1 ] + 1 ; } else { h [ i ] [ j ] = h [ i ] [ j - 1 ] ; } } } } for ( int j = 0 ; j < m ; j ++ ) { for ( int i = 0 ; i < n ; i ++ ) { if ( i == 0 ) { if ( a [ i ] [ j ] == 1 ) { v [ i ] [ j ] = 1 ; } else { v [ i ] [ j ] = 0 ; } } else { if ( a [ i ] [ j ] == 1 ) { v [ i ] [ j ] = v [ i - 1 ] [ j ] + 1 ; } else { v [ i ] [ j ] = v [ i - 1 ] [ j ] ; } } } } ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_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 (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: (method_invocation 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 (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 (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal)))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal)))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))))))) (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 (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal)))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal)))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier)) right: (decimal_integer_literal))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier))))))))))))))