Arithmetic Square, everyone's favourite problem. Welcome to the better problem, Arithmetic Line!
You are given ~N~ integers, which are guaranteed to form an arithmetic sequence. However, they appear scrambled! Can you recreate the arithmetic sequence given the ~N~ integers?
Recall that an arithmetic sequence of length ~N~ is a sequence of integers of the form
$$\displaystyle a, a+d, a+2d, \ldots, a+(N-1)d $$
for integer values of ~a~ and ~d~. For the purposes of this problem, ~d~ is a non-negative integer.
The first line will contain the integer ~N~ ~(1 \le N \le 100)~, the number of integers.
The second line will contain ~N~ integers, ~a_1, a_2, \ldots, a_N~ ~(1 \le a_i \le 10^9)~, the integers you are given. It is guaranteed that these integers form an arithmetic sequence in some permutation of them.
Output the recreated arithmetic sequence.
3 7 3 5
3 5 7
Explanation For Sample
The arithmetic sequence of ~N=3~ integers that is built has ~a=3~ and ~d=2~.