QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100

#16515. Lone

統計

She has a wooden stick of length $m$.

She wants you to divide this stick into $n$ smaller sticks such that the length of each small stick is a positive integer, and any $3$ sticks chosen from them can form a triangle when connected end-to-end.

You want to determine whether you can fulfill her wish.

Input

The input contains multiple test cases.

The first line contains a positive integer $T$, representing the number of test cases.

Each test case consists of a single line containing two integers $n$ and $m$.

Output

For each test case, output a single string on a new line:

  • If you can fulfill her wish, output Yes;
  • If you cannot fulfill her wish, output No.

Examples

Input 1

3
4 7
3 4
5 21

Output 1

Yes
No
Yes

Note

For the first test case, the stick can be divided into smaller sticks of lengths $1, 2, 2, 2$.

For the second test case, it can be proven that no such configuration exists.

For the third test case, one possible configuration is to divide the stick into smaller sticks of lengths $3, 4, 4, 5, 5$.

Constraints

For all test cases, it is guaranteed that:

  • $1 \le T \le 100$
  • $3 \le n \le m \le 10^9$

This problem uses bundled testing.

  • Subtask 1 (18 points): $m \le 500$, $n=3$.
  • Subtask 2 (15 points): $n=3$.
  • Subtask 3 (32 points): $n \times 2 \ge m$.
  • Subtask 4 (35 points): No additional constraints.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.