K. In Filtration 2
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Maddy is still purging Baddy's evil legion...

The game is played on an infinite Chinese Chess (Xiangqi) board, which is formed by the intersection of infinitely many horizontal and vertical lines. Each intersection can hold one chess piece. For ease of description, we abstract it as a 2D Cartesian coordinate system to represent the positions of the pieces.

Baddy controls $$$n$$$ black pawn pieces and one black general piece. These pieces are fixed at their initial positions during the game and will not move. The black pawns are deployed at the intersections $$$(x_1, y_1)$$$, $$$(x_2, y_2)$$$, $$$\ldots$$$, $$$(x_n, y_n)$$$, and the black general is located at $$$(x_\text{K}, y_\text{K})$$$.

Now Maddy controls a red cannon piece. She can deploy the red cannon anywhere on the board. The red cannon follows the movement rules of Chinese Chess. Specifically:

  • Move: Each move, it can travel any number of intersections along the horizontal or vertical line it is currently on. However, a single move must be strictly horizontal or strictly vertical; it cannot move in both directions at once. It cannot jump over other pieces on the same line during a normal move, nor can it capture a piece this way.
  • Capture: It can choose an enemy piece on the same line (horizontal or vertical) as the target, but there must be exactly one piece (of any color) between them. After capturing, the cannon moves to the position of the captured enemy piece, and the captured piece is removed from the board.

After deploying the red cannon, Maddy can continuously make an infinite number of moves following the rules above.

Maddy now wants to know: is there a valid deployment strategy and a sequence of moves for the red cannon that can capture the black general? Please help her.

Input

The first line contains a single integer $$$T$$$ ($$$1 \le T \le 10^5$$$), representing the number of test cases.

The first line of each test case contains 3 integers $$$n$$$, $$$x_\text{K}$$$, and $$$y_\text{K}$$$ ($$$0 \le n \le 10^5, -10^9 \le x_\text{K}, y_\text{K} \le 10^9$$$), representing the number of black pawns and the coordinates of the black general.

Each of the following $$$n$$$ lines contains two integers $$$x_i$$$ and $$$y_i$$$ ($$$-10^9 \le x_i, y_i \le 10^9$$$), representing the position of a black pawn.

It is guaranteed that $$$\sum n \le 3 \times 10^5$$$ over all test cases.

Output

For each test case, if there is a valid deployment strategy and a sequence of moves for the red cannon to capture the black general, output a string YES on a single line; otherwise, output a string NO on a single line.

Note that the evaluation is case-insensitive for YES and NO. In other words, when the answer is positive, outputs like yes, YES, Yes, YeS will all be considered correct.

Example
Input
3
0 0 0
1 1 1
0 1
4 1 0
0 1
2 1
1 1
1 2
Output
NO
YES
NO
Note

The figure below shows the positions of the black pieces for the 2nd test case and one possible deployment position for Maddy's red cannon. By deploying it at $$$(-2, -1)$$$, she can directly capture the black general.

The figure below shows the positions of the black pieces for the 3rd test case.

Please note that for demonstration purposes, the sample figures show the board boundaries, but in fact, the problem description has pointed out that the board is infinite.

Here in the picture, Chinese character "将" means general, "卒" means pawn, "炮" means cannon.