public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		while ((line = in.readLine()) != null) {
			int[] nm = readInts(line);
			if(nm[0] == 0 && nm[1] == 0)
				break;
			m = new int[nm[0]][nm[1]];
			for (int i = 0; i < nm[0]; i++)
				m[i] = readInts(in.readLine());
			long area = getMaxRectangleSum();
			out.append(area + "\n");
		}
		System.out.print(out);
	}