## GUPTA MECHANICAL

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

# [Solution] House Planning Codeforces Solution

E. House Planning
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

There are $n$ houses in your city arranged on an axis at points ${h}_{1},{h}_{2},\dots ,{h}_{n}$. You want to build a new house for yourself and consider two options where to place it: points ${p}_{1}$ and ${p}_{2}$.

As you like visiting friends, you have calculated in advance the distances from both options to all existing houses. More formally, you have calculated two arrays ${d}_{1}$${d}_{2}$${d}_{i,j}=|{p}_{i}-{h}_{j}|$, where $|x|$ defines the absolute value of $x$.

After a long time of inactivity you have forgotten the locations of the houses $h$ and the options ${p}_{1}$${p}_{2}$. But your diary still keeps two arrays — ${d}_{1}$${d}_{2}$, whose authenticity you doubt. Also, the values inside each array could be shuffled, so values at the same positions of ${d}_{1}$ and ${d}_{2}$ may correspond to different houses. Pay attention, that values from one array could not get to another, in other words, all values in the array ${d}_{1}$ correspond the distances from ${p}_{1}$ to the houses, and in the array ${d}_{2}$  — from ${p}_{2}$ to the houses.

Also pay attention, that the locations of the houses ${h}_{i}$ and the considered options ${p}_{j}$ could match. For example, the next locations are correct: $h=\left\{1,0,3,3\right\}$$p=\left\{1,1\right\}$, that could correspond to already shuffled ${d}_{1}=\left\{0,2,1,2\right\}$${d}_{2}=\left\{2,2,1,0\right\}$.

Check whether there are locations of houses $h$ and considered points ${p}_{1}$${p}_{2}$, for which the founded arrays of distances would be correct. If it is possible, find appropriate locations of houses and considered options.

Input

The first line of the input contains a single integer $t$ ($1\le t\le {10}^{3}$) — the number of test cases. The description of test cases follows.

The first line of each test case contains one integer $n$ ($1\le n\le {10}^{3}$) — the length of arrays ${d}_{1}$${d}_{2}$.

The next two lines consist arrays ${d}_{1}$ and ${d}_{2}$ ($0\le {d}_{i,j}\le {10}^{9}$) respectively.

It is guaranteed that the sum of $n$ over all test cases doesn't exceed $2\cdot {10}^{3}$.

Output

For each test case, output a single line "NO" if there is no answer.

Otherwise output three lines. The first line must contain "YES". In the second line, print $n$ integers ${h}_{1},{h}_{2},\dots ,{h}_{n}$. In the third line print two integers ${p}_{1}$${p}_{2}$.

It must be satisfied that $0\le {h}_{i},{p}_{1},{p}_{2}\le 2\cdot {10}^{9}$. We can show that if there is an answer, then there is one satisfying these constraints.

If there are several answers, output any of them.