Problem Statement
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:
- 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.
If the operator cannot perform an operation satisfying the above condition, the sequence of operations ends there.
Both 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.
You are given $T$ test cases to solve.
Constraints
$1 \leq T \leq 10^5$$2 \leq N \leq 2 \times 10^5$$1 \leq K \leq N-1$- All input values are integers.
Input
The input is given from Standard Input in the following format:
T
\mathrm{case}_1
\mathrm{case}_2
\vdots
\mathrm{case}_T
Each test case $\mathrm{case}_i$ $(1 \leq i \leq T)$ is in the following format:
N K
Output
Print $T$ lines. The $i$-th line should contain Yes if all points can be colored black for the $i$-th test case, and No otherwise.
样例
4
6 2
6 3
6 1
200000 100000
Yes
No
Yes
No
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。