#include <bits/stdc++.h>
using namespace std;
long long n,m,a[210][210],sum[210][210];
int res;
int main () {
freopen("long.in","r",stdin);
freopen("long.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
cin >> n >> m;
for (int i=1;i<=n;i++) {
for (int j=1;j<=m;j++) {
cin >> a[i][j];
}
}
for (int i=1;i<=n;i++) {
for (int j=1;j<=m;j++) {
sum[i][j]=a[i][j]+sum[i-1][j]+sum[i][j-1]-sum[i-1][j-1];
}
}
for (int i=1;i<=n;i++) {
for (int j=1;j<=m;j++) {
for (int k=i;k<=n;k++) {
for (int t=j;t<=m;t++) {
if (sum[k][t]-sum[i-1][t]-sum[k][j-1]+sum[i-1][j-1]>=0) {
res=max(res,(k-i+1)*(t-j+1));
}
}
}
}
}
cout << res;
return 0;
}