P19431 [CodeChef] COMPLEXITY
普及-
题目描述

A sorting algorithm A is said to have more time complexity than a sorting algorithm B if it uses more number of comparisons for sorting the same array than algorithm B.

Given that algorithm A uses X comparisons to sort an array and algorithm B uses Y comparisons to sort the same array, find whether algorithm A has more time complexity.

------ Input Format ------

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • Each test case consists of two space-separated integers X and Y — the number of comparisons used by algorithms A and B to sort the array respectively.

------ Output Format ------

For each test case, output on a new line, YES, if the algorithm A has more time complexity than B and NO otherwise.

You may print each character of the string in uppercase or lowercase (for example, the strings YES, yEs, yes, and yeS will all be treated as identical).

------ Constraints ------

$1 ≤ T ≤ 100$
$1 ≤ X, Y ≤ 100$

----- Sample Input 1 ------
4
9 9
15 7
10 19
21 20

----- Sample Output 1 ------
NO
YES
NO
YES
----- explanation 1 ------
Test case $1$: The number of comparisons used by algorithm $A$ is $9$ and that used by $B$ is also $9$. Since the number of comparisons used by $A$ is not more than that of $B$, $A$ does not have more time complexity than $B$.

Test case $2$: The number of comparisons used by algorithm $A$ is $15$ and that used by $B$ is $7$. Since the number of comparisons used by $A$ is more than that of $B$, $A$ does have more time complexity than $B$.

Test case $3$: The number of comparisons used by algorithm $A$ is $10$ and that used by $B$ is $19$. Since the number of comparisons used by $A$ is not more than that of $B$, $A$ does not have more time complexity than $B$.

Test case $4$: The number of comparisons used by algorithm $A$ is $21$ and that used by $B$ is $20$. Since the number of comparisons used by $A$ is more than that of $B$, $A$ does have more time complexity than $B$.

输入格式

见题面

输出格式

见题面

样例输入
4 9 9 15 7 10 19 21 20
样例输出
NO YES NO YES