-----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 = 'import re\n\nfor _ in range(int(input())):\n    n = int(input())\n    b = list(map(int,input().split()))\n    g = list(map(int,input().split()))\n    a = sorted(b)\n    b = sorted(g)\n    i,j = 0,0\n    x = ""\n    cutt = 2\n\n    while i<n and j<n:\n        if a[i]<b[j]:\n            x+="b"\n            i+=1\n        elif a[i]==b[j]:\n            if len(x)==0:\n                x+="b"\n                cutt=1\n                i+=1\n            elif x[-1]=="b":\n                x+="g"\n                j+=1\n            else:\n                x+="b"\n                i+=1\n\n        else:\n            x+="g"\n            j+=1\n\n    while i<n:\n        x+="b"\n        i+=1\n    while j<n:\n        x+="g"\n        j+=1\n\n\n    w = re.findall(r"[b]{2}",x)\n    t = re.findall(r"[g]{2}",x)\n\n    if (w or t) and cutt ==1:\n        i=0\n\n        n=len(a)\n        j=0\n        x=""\n\n        while i<n and j<n:\n\n            if a[i]<b[j]:\n                x+="b"\n                i+=1\n            elif a[i]==b[j]:\n                if len(x)==0:\n                    x+="g"\n\n                    j+=1\n                elif x[-1]=="b":\n                    x+="g"\n                    j+=1\n                else:\n                    x+="b"\n                    i+=1\n\n            else:\n                x+="g"\n                j+=1\n\n        while i<n:\n            x+="b"\n            i+=1\n        while j<n:\n            x+="g"\n            j+=1\n\n\n        w = re.findall(r"[b]{2}",x)\n        t = re.findall(r"[g]{2}",x)\n        if w or t:\n            print("NO")\n        else:\n            print(\'YES\')\n            \n    elif w or t:\n        print("NO")\n    else:\n        print("YES")'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 32526