#include <bits/stdc++.h>
using namespace std;
long long a[201][201],f[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 (i=1;i<=n;i++){
for (j=1;j<=m;j++) {
cin>>a[i][j];
f[i][j]=f[i][j-1]+f[i-1][j]-f[i-1][j-1]+a[i][j];
}
}
for (i=1;i<=n;i++){
for (j=1;j<=m;j++) {
for (x=i;x<=n;x++){
for (y=j;y<=m;y++){
if (!(f[x][y]+f[i-1][j-1]-f[x][j-1]-f[i-1][y]<=0)){
if ((z=(long long)(x-i+1)*(y-j+1))>=ans){
ans=z;
}
}
}
}
}
}
cout<<ans<<endl;
return 0;
}