欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF1437A.Marketing Scheme
Marketing Scheme
You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.
Suppose you decided to sell packs with cans in a pack with a discount and some customer wants to buy cans of cat food. Then he follows a greedy strategy:
- he buys packs with a discount;
- then he wants to buy the remaining cans one by one.
is divided by rounded down, is the remainer of divided by .
But customers are greedy in general, so if the customer wants to buy cans one by one and it happens that he decides to buy the whole pack of cans (instead of buying cans). It makes you, as a marketer, happy since the customer bought more than he wanted initially.
You know that each of the customers that come to your shop can buy any number of cans from to inclusive. Can you choose such size of pack that each customer buys more cans than they wanted initially?
Input
The first line contains a single integer () — the number of test cases.
The first and only line of each test case contains two integers and () — the range of the number of cans customers can buy.
Output
For each test case, print YES if you can choose such size of pack that each customer buys more cans than they wanted initially. Otherwise, print NO.
You can print each character in any case.
Note
In the first test case, you can take, for example, as the size of the pack. Then if a customer wants to buy cans, he'll buy instead (, ). The one who wants cans will also buy cans.
In the second test case, there is no way to choose .
In the third test case, you can take, for example, .
Samples
3
3 4
1 2
120 150
YES
NO
YES
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |