Codeforces Round 232 (Div. 2)
B
On Corruption and Numbers
Codeforces
未评级
原题
← AC →
翻译中…

Alexey, a merry Berland entrant, got sick of the gray reality and he zealously wants to go to university. There are a lot of universities nowadays, so Alexey is getting lost in the diversity — he has not yet decided what profession he wants to get. At school, he had bad grades in all subjects, and it's only thanks to wealthy parents that he was able to obtain the graduation certificate.

翻译中…

The situation is complicated by the fact that each high education institution has the determined amount of voluntary donations, paid by the new students for admission — $*n*_{*i*}$ berubleys. He cannot pay more than $*n*_{*i*}$, because then the difference between the paid amount and $*n*_{*i*}$ can be regarded as a bribe!

翻译中…

Each rector is wearing the distinctive uniform of his university. Therefore, the uniform's pockets cannot contain coins of denomination more than $*r*_{*i*}$. The rector also does not carry coins of denomination less than $*l*_{*i*}$ in his pocket — because if everyone pays him with so small coins, they gather a lot of weight and the pocket tears. Therefore, a donation can be paid only by coins of denomination $*x*$ berubleys, where $*l*_{*i*} ≤ *x* ≤ *r*_{*i*}$ (Berland uses coins of any positive integer denomination). Alexey can use the coins of different denominations and he can use the coins of the same denomination any number of times. When Alexey was first confronted with such orders, he was puzzled because it turned out that not all universities can accept him! Alexey is very afraid of going into the army (even though he had long wanted to get the green uniform, but his dad says that the army bullies will beat his son and he cannot pay to ensure the boy's safety). So, Alexey wants to know for sure which universities he can enter so that he could quickly choose his alma mater.

翻译中…

Thanks to the parents, Alexey is not limited in money and we can assume that he has an unlimited number of coins of each type.

翻译中…

In other words, you are given $*t*$ requests, each of them contains numbers $*n*_{*i*}, *l*_{*i*}, *r*_{*i*}$. For each query you need to answer, whether it is possible to gather the sum of exactly $*n*_{*i*}$ berubleys using only coins with an integer denomination from $*l*_{*i*}$ to $*r*_{*i*}$ berubleys. You can use coins of different denominations. Coins of each denomination can be used any number of times.

翻译中…

Input

翻译中…

The first line contains the number of universities $*t*$, ($1 ≤ *t* ≤ 1000$) Each of the next $*t*$ lines contain three space-separated integers: $*n*_{*i*}, *l*_{*i*}, *r*_{*i*}$ ($1 ≤ *n*_{*i*}, *l*_{*i*}, *r*_{*i*} ≤ 10^{9}; *l*_{*i*} ≤ *r*_{*i*}$).

翻译中…

Output

翻译中…

For each query print on a single line: either "Yes", if Alexey can enter the university, or "No" otherwise.

翻译中…

Note

翻译中…

You can pay the donation to the first university with two coins: one of denomination 2 and one of denomination 3 berubleys. The donation to the second university cannot be paid.

翻译中…

样例

Input #1
2
5 2 3
6 4 5
Output #1
Yes
No
InputCopy OutputCopy
题目信息
题号
397B
时间限制
1 s
内存限制
256 MB
标签
构造
模拟
数学

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