P1749 [Beginner Contest #19] Distributing Cookies II

Description

A teacher has $N$ cookies and wants to distribute them to $k$ children. Each child must receive at least one cookie, and the teacher wants every child to receive a different number of cookies. Determine whether the teacher can achieve this goal.

Input Format

**This problem contains multiple groups of testdata within a single test point.** The input has a total of $T + 1$ lines. The first line contains an integer $T$, representing the number of testdata groups. The next $T$ lines each contain two integers $N, k$.

Output Format

Output $T$ lines, corresponding to the $T$ testdata groups in order. - If it is possible, output `Yes`. - If it is not possible, output `No`.

Explanation/Hint

### Constraints - For $50\%$ of the testdata: $1 \le k \le 1000$, $1 \le N \le 10^6$. - For $100\%$ of the testdata: $1 \le k, N \le 10^9$. - $1 \le T \le 10^5$ Translated by ChatGPT 5