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