A polyomino is a shape made by joining several 1×1 squares. It must satisfy the following conditions.
- The squares must not overlap.
- The whole shape must be connected.
- Squares must be joined edge to edge. Two squares that touch only at a corner are not connected.
A polyomino made of 4 squares is called a tetromino. There are 5 tetrominoes, shown below.

Areum wants to place one tetromino on a sheet of paper of size N×M. The paper is divided into 1×1 cells, and each cell has one integer written on it.
Write a program that places one tetromino so that the sum of the numbers in the cells it covers is as large as possible.
Each square of the tetromino must cover exactly one cell. You may rotate or reflect the tetromino.