Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 5 \cdot 10^4$). The description of the test cases follows.

The first line of each test case contains three integers $n$, $s$, and $h$, denoting the number of grates, the~initial coordinate of Katniss, and the coordinate of the hatch ($1 \le n \le 2 \cdot 10^5$; $-10^6 \le s, h \le 10^6$).

The $i$-th of the following $n$ lines contains two integers $k_i$ and $g_i$, denoting the coordinate of the $i$-th key and the coordinate of the grate that can be unlocked with this key ($-10^6 \le k_i, g_i \le 10^6$).

All $2n+2$ integers $s$, $h$, $k_i$, and $\ell_i$ are distinct.

It is guaranteed that the sum of $n$ over all test cases does not exceed $2 \cdot 10^5$.