B. K Integers
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You're given two integers $$$n,k$$$,determine if there are $$$k$$$ positive integers $$$a_1,a_2,...,a_k$$$ satisfy:

  1. $$$a_1+a_2+...+a_k=n$$$;
  2. $$$gcd(a_1,a_2,..,a_k) \gt 1$$$.
Input

The first line of input will contain a single integer $$$t(1 \leq t \leq 10^5)$$$, denoting the number of test cases.

Each test case consists of a line of input.The only line of each test case contains two integers $$$n,k(2 \leq k \leq n \leq 10^5)$$$.

Output

For each test case, output "Yes" (without quotes) if there are $$$k$$$ posotive integers $$$a_1,a_2,...,a_k$$$ satisfy the condition above, and "No" (without quotes) otherwise.

You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.

Example
Input
5
4 2
4 3
15 4
100000 2
100000 100000
Output
YES
NO
YES
YES
NO
Note

Test case $$$1$$$:

$$$a_1=2,a_2=2$$$ satisfy the condition since $$$a_1+a_2=4$$$ and $$$gcd(a_1,a_2)=gcd(2,2)=2 \gt 1$$$.

Test case $$$2$$$:

There're not $$$3$$$ positive integers satisfy the condition.