P11204 "Cfz Round 9" Lone

Background

[Click here (or at the bottom of this page) to download the English version of statements for this contest (PDF).](https://www.luogu.com.cn/fe/api/problem/downloadAttachment/of2k8jng?contestId=205839)

Description

She has a wooden stick of length $m$. She wants you to cut this stick into $n$ smaller sticks, such that each smaller stick has a **positive integer** length, and any $3$ of the smaller sticks you choose can form a triangle by connecting end to end. You want to determine whether you can satisfy her wish.

Input Format

**This problem contains multiple test cases.** The first line contains a positive integer $T$, which denotes the number of test cases. Then follow the test cases. For each test case, there is one line containing two integers $n, m$.

Output Format

For each test case, output one string per line: - If you can satisfy her wish, output `Yes`. - If you cannot, output `No`.

Explanation/Hint

#### "Sample Explanation #1" For the $1$-st test case, you can cut the stick into smaller sticks with lengths $1, 2, 2, 2$. For the $2$-nd test case, it can be proven that there is no solution that meets the requirements. For the $3$-rd test case, one feasible solution is to cut the stick into smaller sticks with lengths $3, 4, 4, 5, 5$. #### "Constraints" For all testdata, it is guaranteed that: - $1 \le T \le 100$. - $3 \le n \le m \le 10^9$. **This problem uses bundled tests.** - Subtask 0 (18 points): $m \le 500$, $n = 3$. - Subtask 1 (15 points): $n = 3$. - Subtask 2 (32 points): $n \times 2 \ge m$. - Subtask 3 (35 points): No special constraints. Translated by ChatGPT 5