Consider two sets A and B, let define their sum set S(A,B)={a+b|a∈A,b∈B}. Now given a set C, your task is to find two sets A and B such that 50≤|A|,50≤|B|,|C|≤|S(A,B)|.
Assumption, C={c1,c2,...,cn},S(A,B)={s1,s2,...,sm},c1<c2<⋯<cn,s1<s2<⋯<sm. We define the score as: ∑m−ni=0∑nj=1|cj−sj+i|. You are asked to minimize the score.
Input
The first line contains an integer K denoting the number of elements of set C.
The following line contains K space-separated integers c1,c2,…,cK denoting the elements of set C.
Output
Output four lines:
Constraints
Data generation:
Note that: The constraints on the number of elements of each set is ignored in this example.