#P1749. [入门赛 #19] 分饼干 II

[入门赛 #19] 分饼干 II

Problem Description

A teacher has NN cookies and wants to distribute them to kk 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+1T + 1 lines.

The first line contains an integer TT, representing the number of testdata groups.
The next TT lines each contain two integers N,kN, k.

Output Format

Output TT lines, corresponding to the TT testdata groups in order.

  • If it is possible, output Yes.
  • If it is not possible, output No.
1
1 1

Yes

1
5 3

No

Hint

Constraints

  • For 50%50\% of the testdata: 1k10001 \le k \le 1000, 1N1061 \le N \le 10^6.
  • For 100%100\% of the testdata: 1k,N1091 \le k, N \le 10^9.
  • 1T1051 \le T \le 10^5

Translated by ChatGPT 5