-----Problem Statement-----
A classroom has several students, half of whom are boys and half of whom are girls. You need to arrange all of them in a line for the morning assembly such that the following conditions are satisfied:
- The students must be in order of non-decreasing height.
- Two boys or two girls must not be adjacent to each other.
You have been given the heights of the boys in the array $b$ and the heights of the girls in the array $g$. Find out whether you can arrange them in an order which satisfies the given conditions. Print "YES" if it is possible, or "NO" if it is not.
For example, let's say there are $n = 3$ boys and $n = 3$ girls, where the boys' heights are $b = [5, 3, 8]$ and the girls' heights are $g = [2, 4, 6]$. These students can be arranged in the order $[g_0, b_1, g_1, b_0, g_2, b_2]$, which is $[2, 3, 4, 5, 6, 8]$. Because this is in order of non-decreasing height, and no two boys or two girls are adjacent to each other, this satisfies the conditions. Therefore, the answer is "YES".

-----Input-----
- The first line contains an integer, $t$, denoting the number of test cases.
- The first line of each test case contains an integer, $n$, denoting the number of boys and girls in the classroom.
- The second line of each test case contains $n$ space separated integers, $b_1,b_2, ... b_n$, denoting the heights of the boys.
- The second line of each test case contains $n$ space separated integers, $g_1,g_2,... g_n$, denoting the heights of the girls.

-----Output-----
Print exactly $t$ lines. In the $i^{th}$ of them, print a single line containing "$YES$" without quotes if it is possible to arrange the students in the $i^{th}$ test case, or "$NO$" without quotes if it is not.

-----Constraints-----
- $1 \leq t \leq 10$
- $1 \leq n \leq 100$
- $1 \leq b_i, g_i \leq 100$

-----Sample Input-----
1
2
1 3
2 4

-----Sample Output-----
YES

-----EXPLANATION-----
The following arrangement would satisfy the given conditions: $[b_1, g_1, b_2, g_2]$. This is because the boys and girls and separated, and the height is in non-decreasing order.

```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 = 'for _ in range(int(input())):\r\n    n = int(input())\r\n    b = list(map(int, input().split()))\r\n    g = list(map(int, input().split()))\r\n    b.sort()\r\n    g.sort()\r\n    ans = []\r\n    flag = 0\r\n    val = 0\r\n    st = 0\r\n    if (b[0] < g[0]):\r\n        f = \'b\'\r\n        ans.append(min(b[0], g[0]))\r\n        ans.append(max(b[0], g[0]))\r\n        st = 1\r\n    elif g[0] > b[0]:\r\n        f = \'g\'\r\n        st = 1\r\n        ans.append(min(b[0], g[0]))\r\n        ans.append(max(b[0], g[0]))\r\n    else:\r\n        for i in range(n):\r\n            if (b[i] < g[i]):\r\n                f = \'b\'\r\n                st = i\r\n                break\r\n            elif g[i] < b[i]:\r\n                st = i\r\n                f = \'g\'\r\n                break\r\n            ans.append(b[i])\r\n            ans.append(g[i])\r\n    if (len(ans) == (2 * n)):\r\n        val = 1\r\n    if (n >= 2 and val != 1):\r\n        for i in range(st, n):\r\n            if (f == \'b\'):\r\n                ans.append(b[i])\r\n                ans.append(g[i])\r\n            else:\r\n                ans.append(g[i])\r\n                ans.append(b[i])\r\n\r\n    for i in range(1, len(ans)):\r\n        if (ans[i] < ans[i - 1]):\r\n            flag = 1\r\n            break\r\n    if (flag):\r\n        print(\'NO\')\r\n    else:\r\n        print("YES")\r\n\r\n\r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14269