## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Mark the Photographer Codeforces Solution

A. Mark the Photographer

time limit per test
memory limit per test
input
output
standard output standard input256 megabytes1 second

Mark is asked to take a group photo of $2n$ people. The $i$-th person has height ${h}_{i}$ units.

To do so, he ordered these people into two rows, the front row and the back row, each consisting of $n$ people. However, to ensure that everyone is seen properly, the $j$-th person of the back row must be at least $x$ units taller than the $j$-th person of the front row for each $j$ between $1$ and $n$, inclusive.

mohit

Help Mark determine if this is

Input

The first line contains one integer $t$ ($1\le t\le 100$) — the number of test cases. Each test case consists of two lines.

The first line of each test case contains two positive integers $n$ and $x$ ($1\le n\le 100$$1\le x\le {10}^{3}$)

Mark and the Online Exam Codeforces Solution

Mark and Professor Koro Codeforces Solution

Mark and Lightbulbs Codeforces Solution

Mark and His Unfinished Essay Codeforces Solution

Mark the Dust Sweeper Codeforces Solution

Mark the Photographer Codeforces Solution

— the number of people in each row and the minimum difference Mark wants.

The second line of each test case contains $2n$ positive integers ${h}_{1},{h}_{2},\dots ,{h}_{2n}$ ($1\le {h}_{i}\le {10}^{3}$) — the height of each person in units.

Note that the sum of $n$ over all test cases is not bounded.

Output

For each test case, print a single line containing "YES" if Mark could arrange people satisfying his condition and "NO" otherwise.

You may print each letter in any case (for example, YESYesyesyEs will all be recognized as positive answers).