Charming Meals

시간 제한2초메모리 제한2048 MB

문제

The Czech cuisine features $n$ appetizers and $n$ main dishes. The $i$-th appetizer has spiciness $a_i$, and the $i$-th main dish has spiciness $b_i$.

A typical Czech meal consists of exactly one appetizer and one main dish. You want to pair up the $n$ appetizers and $n$ main dishes into $n$ meals with each appetizer and each main dish being included in exactly one meal.

Your meals shall surprise the diners, so you want the spiciness levels of the two parts of the same meal to be as different as possible. The charm of a meal is the difference (in absolute value) between the spiciness of the appetizer and the spiciness of the main dish. So, a meal consisting of an appetizer with spiciness $x$ and a main dish with spiciness $y$ has charm equal to $|x - y|$.

You want to maximize the minimum charm of the resulting $n$ meals. What is the largest possible value of the minimum charm that you can achieve?

입력

Each test contains multiple test cases. The first line contains an integer $t$ ($1 ≤ t ≤ 1\, 000$) — the number of test cases. The descriptions of the $t$ test cases follow.

The first line of each test case contains a single integer $n$ ($1 ≤ n ≤ 5\, 000$) —the number of appetizers and main dishes.

The second line of each test case contains $n$ integers $a_1, a_2, \dots , a_n$ ($0 ≤ a_i ≤ 10^9$) — the spicinesses of the $n$ appetizers.

The third line of each test case contains $n$ integers $b_1, b_2, \dots , b_n$ ($0 ≤ b_i ≤ 10^9$) — the spicinesses of the $n$ main dishes.

It is guaranteed that the sum of $n^2$ over all test cases does not exceed $25 \cdot 10^6$.

출력

For each test case, print the largest possible value of the minimum charm you can achieve.