{"problem":{"name":"No Attacking","description":{"content":"There is a chessboard with $N$ rows and $N$ columns. Let $(i, j)$ denote the square at the $i$\\-th row from the top and the $j$\\-th column from the left.   You will now place pieces on the board. Ther","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc171_a"},"statements":[{"statement_type":"Markdown","content":"There is a chessboard with $N$ rows and $N$ columns. Let $(i, j)$ denote the square at the $i$\\-th row from the top and the $j$\\-th column from the left.  \nYou will now place pieces on the board. There are two types of pieces, called **rooks** and **pawns**.  \nA placement of pieces is called a **good arrangement** when it satisfies the following conditions:\n\n*   Each square has zero or one piece placed on it.\n*   If there is a rook at $(i, j)$, there is no piece at $(i, k)$ for all $k$ $(1 \\leq k \\leq N)$ where $k \\neq j$.\n*   If there is a rook at $(i, j)$, there is no piece at $(k, j)$ for all $k$ $(1 \\leq k \\leq N)$ where $k \\neq i$.\n*   If there is a pawn at $(i, j)$ and $i \\geq 2$, there is no piece at $(i-1, j)$.\n\nIs it possible to place all $A$ rooks and $B$ pawns on the board in a good arrangement?\nYou are given $T$ test cases; solve each of them.\n\n## Constraints\n\n*   $1 \\leq T \\leq 10^5$\n*   $1 \\leq N \\leq 10^4$\n*   $0 \\leq A, B$\n*   $1 \\leq A + B \\leq N^2$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format. Here, $\\mathrm{case}_i$ represents the $i$\\-th case.\n\n$T$\n$\\mathrm{case}_1$\n$\\mathrm{case}_2$\n$\\vdots$\n$\\mathrm{case}_T$\n\nEach test case is given in the following format.\n\n$N$ $A$ $B$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc171_a","tags":[],"sample_group":[["8\n5 2 3\n6 5 8\n3 2 2\n11 67 40\n26 22 16\n95 91 31\n80 46 56\n998 2 44353","Yes\nNo\nNo\nNo\nYes\nNo\nYes\nYes\n\nIn the first test case, for example, you can place rooks at $(1, 1)$ and $(2, 4)$, and pawns at $(3, 3)$, $(4, 2)$, and $(5, 3)$ to have all the pieces in a good arrangement.  \nIn the second test case, it is impossible to place all the pieces in a good arrangement."]],"created_at":"2026-03-03 11:01:13"}}