The city of Ruralia is building a tower consisting of $$$n$$$ Jenga blocks.
Each block is rectangular with height $$$1$$$, width $$$r_i - l_i$$$, and density $$$1$$$ and will be placed on the plane, axis-aligned with its bottom left corner lying on the coordinates $$$(l_i,n-i)$$$.
After all the blocks have been placed, all of the scaffolding will be removed, and the tower will stay standing if for each block $$$i$$$ the center of mass of all blocks above $$$i$$$ is between $$$l_i$$$ and $$$r_i$$$.
More formally, a tower is stable if and if only for all $$$2 \leq i \leq n$$$ the following inequality holds.
$$$$$$l_i \leq \frac{\sum_{j=1}^{i-1} (r_j - l_j) \cdot \frac{l_j + r_j}2}{\sum_{j=1}^{i-1} (r_j - l_j)}\leq r_i $$$$$$
Unfortunately, you have received news that one of the Jenga blocks has been missing but you are unsure which one. When the shipment arrives, the builders of Ruralia will place the blocks as originally planned, except the one missing block will not be placed and all blocks above it will be moved downwards by $$$1$$$.
However, before building the tower, the builders want to know if the resulting tower will be stable. Thus, they have asked you to determine for each block $$$i$$$ whether the structure with block $$$i$$$ missing is stable.
Do note that it is not necessarily the case that the original tower plan was stable.
The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 2\cdot 10^5$$$) — the number of blocks in the original tower.
The following $$$n$$$ lines each contain two integers $$$l_i, r_i$$$ ($$$1 \leq l_i \lt r_i \leq 10^6$$$)— the endpoints of block $$$i$$$.
It is not necessary that the tower in the input is stable.
Output $$$n$$$ lines.
On line $$$i$$$, output "YES" or "NO" — corresponding to whether the tower will be stable if block $$$i$$$ is removed.
50 104 100 64 100 6
NO YES NO YES YES
46 80 30 80 6
YES YES NO NO