Frieren is analyzing a magic barrier, whose strength at specific points can be represented as a 2D grid,
Note: Fast input is highly recommended for this problem. Also, Python users should submit with PyPy as it is significantly faster.
Constraints
All values of
Subtask 1 [15%]
Subtask 2 [85%]
Input Specification
The first line contains
The next
The next
Output Specification
For each question, output yes
if the no
otherwise.
Sample Input 1
3 3 3
1 7 11
10 5 9
4 3 2
10 1 1 1 2
3 2 2 3 3
100 2 2 3 3
Sample Output 1
no
yes
no
Explanation for Sample Output 1
The rectangle for the first question is shown in blue.
The rectangle for the second question is shown in yellow.
The rectangle for the third question is shown in yellow.
Sample Input 2
2 3 2
1 2 3
4 5 6
1 1 1 1 1
1 2 2 2 3
Sample Output 2
yes
no
Comments