Codeforces Round 1045 (Div. 2)
A
Painting With Two Colors
Codeforces
800
原题
←B →
翻译中…

You are given three positive integers $n$, $a$, and $b$ ($1\leq a,b \leq n$).

翻译中…

Consider a row of $n$ cells, initially all white and indexed from $1$ to $n$. You will perform the following two steps in order:

翻译中…
  1. Choose an integer $x$ such that $1 \le x \le n - a + 1$, and paint the $a$ consecutive cells $x, x+1, \ldots, x+a-1$ red.
  2. Choose an integer $y$ such that $1 \le y \le n - b + 1$, and paint the $b$ consecutive cells $y, y+1, \ldots, y+b-1$ blue.
翻译中…

If a cell is painted both red and blue, its final color is blue.

翻译中…

A coloring of the grid is considered symmetric if, for every integer $i$ from $1$ to $n$ (inclusive), the color of cell $i$ is the same as the color of cell $(n+1-i)$. Your task is to determine whether there exist integers $x$ and $y$ such that the final coloring of the grid is symmetric.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 500$). The description of the test cases follows.

翻译中…

The first and the only line of each test case contains three integers $n$, $a$, and $b$ ($1 \le n \le 10^9$, $1 \le a,b \le n$) — the number of cells of the grid and the number of cells to be painted in each step.

翻译中…

Output

翻译中…

For each testcase, output "YES" if it is possible that the final coloring of the grid is symmetric; otherwise, output "NO".

翻译中…

You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.

翻译中…

Note

翻译中…

In the first test case, the grid becomes symmetric when choosing $x = 2$ and $y = 3$, so the answer is "YES". The following figure illustrates each step of the coloring process:

翻译中…

image

翻译中…

In the second test case, the grid becomes symmetric when choosing $x = 2$ and $y = 2$, so the answer is "YES". The following figure illustrates each step of the coloring process:

翻译中…

image

翻译中…

In the third and fourth test cases, it can be proved that no choice of $x$ and $y$ results in a symmetric grid, so the answer is "NO".

翻译中…

样例

Input #1
7
5 3 1
4 1 2
7 7 4
8 3 7
1 1 1
1000000000 1000000000 1000000000
3 2 1
Output #1
YES
YES
NO
NO
YES
YES
NO
InputCopy OutputCopy
题目信息
题号
2134A
时间限制
1 s
内存限制
256 MB
标签
构造
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。