CF232E Quick Tortoise
Description
John Doe has a field, which is a rectangular table of size $ n×m $ . We assume that the field rows are numbered from 1 to $ n $ from top to bottom, and the field columns are numbered from 1 to $ m $ from left to right. Then the cell of the field at the intersection of the $ x $ -th row and the $ y $ -th column has coordinates ( $ x $ ; $ y $ ).
We know that some cells of John's field are painted white, and some are painted black. Also, John has a tortoise, which can move along the white cells of the field. The tortoise can get from a white cell with coordinates ( $ x $ ; $ y $ ) into cell ( $ x+1 $ ; $ y $ ) or ( $ x $ ; $ y+1 $ ), if the corresponding cell is painted white. In other words, the turtle can move only along the white cells of the field to the right or down. The turtle can not go out of the bounds of the field.
In addition, John has $ q $ queries, each of them is characterized by four numbers $ x_{1},y_{1},x_{2},y_{2} $ ( $ x_{1}
Input Format
N/A
Output Format
N/A