Competitions

# ADA Classes - November 8

# Vasya and matrix

Mother gave Vasya a rectangular matrix **n** by **m**. Each cell of the matrix contains one integer. Vasya played a lot of math games with it: he found its determinant and powered it into some degrees.

But such games made him a little tired, so he invented a new entertainment: he choose an integer **k** and tries to find a submatrix of maximal area with total sum of numbers in it not greater than **k**. The submatrix is a rectangular area of matrix.

#### Input

The first line contains three integers **n**, **m** and **k** (**1** ≤ **n**, **m** ≤ **300**, **1** ≤ **k** ≤ `10`

).^{9}

Each of the next **n** lines contains **m** nonnegative integers, each no more than **1000**.

#### Output

Print the area of maximal submatrix, which sum of numbers is not greater than **k**.

Input example #1

1 3 4 8 6 4

Output example #1

1

Input example #2

3 3 12 7 5 7 8 4 8 4 3 2

Output example #2

3