A polyomino is a shape built by joining several squares of size 1×1, and it satisfies all of the following conditions.
- The squares do not overlap.
- The whole shape is connected.
- Squares are joined along their edges. Two squares that meet only at a corner do not count as joined.
A polyomino made of four squares is called a tetromino, and there are five of them.

Areum wants to place two tetrominoes on a sheet of paper of size N×M. The two tetrominoes must not overlap. The paper is divided into cells of size 1×1, and each cell holds one integer.
When a tetromino is placed, each of its squares must cover exactly one cell, and the tetromino may be rotated or reflected.
Write a program that places two tetrominoes so that the sum of the numbers in the covered cells is as large as possible.