{"problem":{"name":"Symmetric Painting","description":{"content":"On a circle, there are $N$ equally spaced points numbered $0,1,\\ldots,N-1$ in this order, with Alice at point $0$ and Bob at point $K$. Initially, all points are colored white. Starting with Alice, th","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc188_b"},"statements":[{"statement_type":"Markdown","content":"On a circle, there are $N$ equally spaced points numbered $0,1,\\ldots,N-1$ in this order, with Alice at point $0$ and Bob at point $K$. Initially, all points are colored white. Starting with Alice, they alternately perform the following operation:\n\n*   Choose one of the currently white points and color it black. Here, after the operation, the coloring of the points must be symmetric with respect to the straight line connecting the operator and the center of the circle.\n\nIf the operator cannot perform an operation satisfying the above condition, the sequence of operations ends there.\nBoth players cooperate and make the best choices to maximize the total number of points colored black in the end. Determine whether all points are colored black at the end of the sequence of operations.\nYou are given $T$ test cases to solve.\n\n## Constraints\n\n*   $1 \\leq T \\leq 10^5$\n*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq K \\leq N-1$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$T$\n$\\mathrm{case}_1$\n$\\mathrm{case}_2$\n$\\vdots$ \n$\\mathrm{case}_T$\n\nEach test case $\\mathrm{case}_i$ $(1 \\leq i \\leq T)$ is in the following format:\n\n$N$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc188_b","tags":[],"sample_group":[["4\n6 2\n6 3\n6 1\n200000 100000","Yes\nNo\nYes\nNo\n\nFor $N=6$ and $K=2$, all points can be colored black by, for example, performing operations in the following order:\n\n1.  Alice colors point $3$ black.\n2.  Bob colors point $1$ black.\n3.  Alice colors point $5$ black.\n4.  Bob colors point $2$ black.\n5.  Alice colors point $4$ black.\n6.  Bob colors point $0$ black.\n\n![image](https://img.atcoder.jp/arc188/ecb64f0798aaa883117c594cb6db2724.png)\nFor $N=6$ and $K=3$, below is one possible progression. Actually, no matter what they do, they cannot color all points black.\n\n1.  Alice colors point $3$ black.\n2.  Bob colors point $0$ black.\n3.  Alice cannot color any point black so that the coloring will be symmetric with respect to her line, so she cannot perform the operation."]],"created_at":"2026-03-03 11:01:14"}}