Ants#1546

Ants

1 second
128 megabytes
Very easy

An army of ants moves along a horizontal pole of length cm, each with a constant speed of cm/s. When an ant reaches an end of the pole, it immediately falls off. If two ants meet, they turn around and start moving in opposite directions. The initial positions of the ants on the pole are known, but their moving directions are unknown. You are to compute the minimal and maximal possible times for all of the ants to fall off the pole.

Input

The first line contains the number of tests.

For each test, the first line contains two integers: the length of the pole (in cm) and , the number of ants on the pole. Then follow integers that describe the initial positions of the ants, given as their distances from the left end of the pole.

All numbers are not greater than 10^6 and are separated by whitespace.

Output

For each test, output two numbers separated by a space. The first number is the minimal possible time for all ants to fall off the pole (if the directions are chosen accordingly), and the second number is the maximal such time.

Examples

Example 1

Loading
Loading