
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
There is a chessboard with  $m$  columns and  $n$  rows. In each blanks, an integer is given. If a rectangle  $R$  (in this chessboard) has an integer  $h$  satisfying the following two conditions, we call  $R$  as a 'shelf'. 
(i) All integers contained in  $R$  are bigger than  $h$ .
(ii) All integers in blanks, which are not contained in  $R$  but meet with  $R$  at a vertex or a side, are not bigger than  $h$ .
Assume that all integers are given to make shelves as much as possible. Find the number of shelves.

Present the answer in LaTex format: \boxed{Your answer}
user