#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int N=220;
int n,m;
long long sum[N][N],a[N][N];
long long ans=0;
int main() {
freopen("long.in","r",stdin);
freopen("long.out","w",stdout);
cin>>n>>m;
for (int i=1;i<=n;i++)
{
for (int j=1;j<=m;j++)
{
scanf("%lld",&a[i][j]);sum[i][j]=sum[i-1][j]+sum[i][j-1]-sum[i-1][j-1]+a[i][j];
}
}
for (int x=1;x<=n;x++)
{
for (int y=1;y<=m;y++)
{
for (int l=x;l<=n;l++)
{
for (int r=y;r<=m;r++)
{
if (sum[l][r]-sum[x-1][r]-sum[l][y-1]+sum[x-1][y-1]>0)
{
ans=max(ans,(long long)((l-x+1)*(r-y+1)));
}
}
}
}
}
cout<<ans;
}