public static void main ( String args [ ] ) {
  input ( ) ;
  for ( int i = 1 ;
  i < H ;
  i ++ ) {
    for ( int j = 0 ;
    j < W ;
    j ++ ) {
      C [ i ] [ j ] += C [ i - 1 ] [ j ] ;
    }
  }
  for ( int i = 0 ;
  i < H ;
  i ++ ) {
    for ( int j = 1 ;
    j < W ;
    j ++ ) {
      C [ i ] [ j ] += C [ i ] [ j - 1 ] ;
    }
  }
  int ans = 0 ;
  for ( int i = 0 ;
  i < H ;
  i ++ ) {
    for ( int j = i ;
    j < H ;
    j ++ ) {
      for ( int k = 0 ;
      k < W ;
      k ++ ) {
        for ( int l = k ;
        l < W ;
        l ++ ) {
          int tmp = C [ j ] [ l ] ;
          if ( i > 0 ) tmp -= C [ i - 1 ] [ l ] ;
          if ( k > 0 ) tmp -= C [ j ] [ k - 1 ] ;
          if ( i > 0 && k > 0 ) tmp += C [ i - 1 ] [ k - 1 ] ;
          if ( tmp == 0 ) ans = Math . max ( ans , ( j - i + 1 ) * ( l - k + 1 ) ) ;
        }
      }
    }
  }
  System . out . println ( ans ) ;
}

public static void main ( String args [ ] ) { input ( ) ; for ( int i = 1 ; i < H ; i ++ ) { for ( int j = 0 ; j < W ; j ++ ) { C [ i ] [ j ] += C [ i - 1 ] [ j ] ; } } for ( int i = 0 ; i < H ; i ++ ) { for ( int j = 1 ; j < W ; j ++ ) { C [ i ] [ j ] += C [ i ] [ j - 1 ] ; } } int ans = 0 ; for ( int i = 0 ; i < H ; i ++ ) { for ( int j = i ; j < H ; j ++ ) { for ( int k = 0 ; k < W ; k ++ ) { for ( int l = k ; l < W ; l ++ ) { int tmp = C [ j ] [ l ] ; if ( i > 0 ) tmp -= C [ i - 1 ] [ l ] ; if ( k > 0 ) tmp -= C [ j ] [ k - 1 ] ; if ( i > 0 && k > 0 ) tmp += C [ i - 1 ] [ k - 1 ] ; if ( tmp == 0 ) ans = Math . max ( ans , ( j - i + 1 ) * ( l - k + 1 ) ) ; } } } } System . out . println ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (expression_statement (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 (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)))))))) (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: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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: (identifier))) 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 (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))))))))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))