A research laboratory has developed the mysterious Compound S, an unstable substance capable of altering the structure of biological samples. The laboratory has an original batch $$$A$$$ containing $$$N$$$ samples, each with a reactivity level represented by a non-negative integer.
Before the experiment, the scientists recorded two crucial safety metrics:
During the experiment, the entire batch was exposed to Compound S. The chain reaction caused each sample to mutate: its new reactivity level became the sum of the reactivity levels of all the other samples in the original batch.
To stabilize the reaction, the scientists injected two control samples into the batch, having reactivity levels exactly equal to the global values $$$S$$$ and $$$M$$$. Due to the volatility of the process, the resulting $$$N+2$$$ samples were completely mixed, forming the chaotic batch $$$B$$$.
Your task is, given the mixed batch $$$B$$$, to determine the original values $$$S$$$ and $$$M$$$, and reconstruct the reactivity levels of the original batch $$$A$$$, printing them in non-decreasing order.
The first line contains an integer $$$N$$$ ($$$1 \leq N \leq 10^5$$$), representing the size of the original array $$$A$$$.
The second line contains $$$N+2$$$ shuffled integers $$$B_i$$$ ($$$0 \leq B_i \leq 10^{14}$$$), representing the elements of the modified array after the mutation and injection process.
The output must contain two lines.
The first line must contain two integers: the values of $$$S$$$ and $$$M$$$.
The second line must contain the $$$N$$$ integers of the original array $$$A$$$ in non-decreasing order, separated by spaces.
38 3 7 5 6
8 5 1 2 5
40 0 0 0 0 0
0 0 0 0 0 0