There is a grid with two rows and columns.
You are given rectangular regions. The -th rectangle is described by four integers and covers every cell whose row is between and and whose column is between and , inclusive.
Choose some of the rectangles so that no two chosen rectangles cover the same grid cell.
Find the maximum possible number of chosen rectangles.
The input is given from Standard Input in the following format:
For each test case, print the maximum number of rectangles that can be selected.
Rectangles cover no common cell, so four rectangles can be selected. Rectangles and both cover cell , so it is impossible to select all five rectangles.
Each case is given in the following format:
| 3 | 74 | No additional constraints. |