You are given a grid with rows and columns. The cell , with and , is the square of the plane, so the whole grid is the rectangle . The first coordinate is the row and the second coordinate is the column.
A beam of light starts at the point , which is a corner of the cell , and moves continuously with constant velocity : in one unit of time it advances units along the first axis and units along the second axis. Whenever the beam hits a side of the grid it reflects, as a ray of light on a mirror, and when it reaches a corner of the grid it reflects on both sides at once, so it goes back the way it came. The beam never stops.

You are given queries of the form . For each query, determine if the beam will ever pass through the cell . The beam passes through a cell if some point of its trajectory lies strictly inside the square of the cell. Touching only a corner of the cell does not count.
Input data
The first line of standard input contains two space-separated integers and , representing the number of rows and columns of the grid.
The second line of standard input contains four space-separated integers , , , , representing the initial coordinates of the beam and its velocity vector.
The third line contains , the number of queries.
The next lines contain two space-separated integers and , representing the cell of the grid asked by the query.
Output data
Each line of the next lines of standard output must contain the answer to the -th query: YES if the beam passes through the cell, NO otherwise.
The output is not case-sensitive, so answers like yes or No will also be accepted.
Constraints and clarifications
- .
- .
- .
- .
| # | Score | Constraints |
|---|---|---|
| 0 | 0 | Examples. |
| 1 | 5 | or . |
| 2 | 10 | . |
| 3 | 20 | and . |
| 4 | 65 | No additional restrictions. |
Example
stdin
6 9
2 3 1 1
6
2 3
1 3
3 6
4 8
6 9
5 1
stdout
YES
NO
NO
YES
NO
YES
Explanation
In the first sample case the grid has rows and columns, and the beam starts at the corner with velocity , so it moves diagonally and reflects on the walls many times. The beam passes through the cells of the queries , and , which are , and . It never passes through the cells of the queries , and , which are , and .

Example
stdin
6 8
2 3 1 2
6
2 3
1 3
3 6
4 1
5 5
6 7
stdout
YES
NO
YES
YES
NO
NO
Explanation
In the second sample case the grid has rows and columns, and the beam starts at the corner with velocity , so it advances two columns for every row. The beam passes through the cells of the queries , and , which are , and . It never passes through the cells of the queries , and , which are , and .
