{"problem":{"name":"Packing Under Range Regulations","description":{"content":"Solve the following problem for $T$ test cases. There are $10^9$ boxes numbered $1,2,\\dots,10^9$ and $N$ balls numbered $1,2,\\dots,N$.   Each box can contain at most one ball.   Determine whether it i","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc214_e"},"statements":[{"statement_type":"Markdown","content":"Solve the following problem for $T$ test cases.\nThere are $10^9$ boxes numbered $1,2,\\dots,10^9$ and $N$ balls numbered $1,2,\\dots,N$.  \nEach box can contain at most one ball.  \nDetermine whether it is possible to put all $N$ balls in the boxes so that the following condition will be satisfied.\n\n*   For each integer $i$ from $1$ through $N$, the ball numbered $i$ is in a box numbered between $L_i$ and $R_i$ (inclusive).\n\n## Constraints\n\n*   $1 \\le T \\le 2 \\times 10^5$\n*   $1 \\le N \\le 2 \\times 10^5$\n*   $1 \\le L_i \\le R_i \\le 10^9$\n*   The sum of $N$ across the test cases in one input is at most $2 \\times 10^5$.\n\n## Input\n\nInput is given from Standard Input. The first line is in the following format:\n\n$T$\n\nThen, $T$ test cases follows, each of which is in the following format:\n\n$N$\n$L_1$ $R_1$\n$L_2$ $R_2$\n$\\dots$\n$L_N$ $R_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc214_e","tags":[],"sample_group":[["2\n3\n1 2\n2 3\n3 3\n5\n1 2\n2 3\n3 3\n1 3\n999999999 1000000000","Yes\nNo\n\nThis input contains two test cases.\n\n*   In the $1$\\-st test case, the following way to put the three balls would satisfy the condition, so we should print `Yes`.\n    *   Put Ball $1$ in Box $1$.\n    *   Put Ball $2$ in Box $2$.\n    *   Put Ball $3$ in Box $3$.\n*   In the $2$\\-nd test case, there is no way to put the five balls to satisfy the condition, so we should print `No`."]],"created_at":"2026-03-03 11:01:13"}}