CF407D Largest Submatrix 3

Description

You are given matrix $ a $ of size $ n×m $ , its elements are integers. We will assume that the rows of the matrix are numbered from top to bottom from 1 to $ n $ , the columns are numbered from left to right from 1 to $ m $ . We will denote the element on the intersecting of the $ i $ -th row and the $ j $ -th column as $ a_{ij} $ . We'll call submatrix $ i_{1},j_{1},i_{2},j_{2} $ $ (1

Input Format

The first line contains two integers $ n $ , $ m $ ( $ 1

Output Format

Print a single integer — the area of the optimal inhomogenous submatrix.