Rachel has some candies and she decided to distribute them among $N$ kids. The ith kid receives $A_i$ candies. The kids are happy iff the difference between the highest and lowest number of candies received is less than $X$.
Find out if the children are happy or not.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- The first line contains $N$ and $X$. 
- The second line contains $N$ integers $A_1,A_2,...,A_N$. 

-----Output:-----
For each test case print either "YES"(without quotes) if the kids are happy else "NO"(without quotes)

-----Constraints-----
- $1 \leq T \leq 100$
- $1 \leq N, X \leq 10^5$
- $1 \leq A_i \leq 10^5$

-----Sample Input:-----
2

5 6

3 5 6 8 1

3 10

5 2 9

-----Sample Output:-----
NO

YES

-----EXPLANATION:-----
- Example 1: Difference between maximum and minimum candies received is 8-1=7. 7 is greater than 6, therefore, the kids are not happy.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\n# cook your dish here\nfrom sys import stdout, stdin\n\n\ndef main():\n    numOfKids, difference = list(map(str, input().split()))\n    numbers = [int(x) for x in stdin.readline().split()]\n    numOfKids = int(numOfKids)\n    difference = int(difference)\n    smallest = largest = numbers[0]\n    for j in range(1, len(numbers)):\n        if (smallest > numbers[j]):\n            smallest = numbers[j]\n            min_position = j\n        if (largest < numbers[j]):\n            largest = numbers[j]\n            max_position = j\n    listDiff = largest - smallest\n    #print(largest)\n    #print(smallest)\n    #print(difference)\n    if(listDiff > difference):\n        print("NO")\n    elif(difference > listDiff):\n        print("YES")\n    elif(difference == listDiff):\n        print("NO")\n\n\ndef __starting_point():\n    testCases = int(stdin.readline())\n    if 0 <= testCases <= 100:\n        for _ in range(testCases):\n            main()\n\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13471