Skinny Pete lives far away from locality on his own. Two days ago he met Badger in a forest who was looking for knowledges to solve a problem. Skinny Pete and Badger bonded immediately, as Pete never had any friends, it was refreshing for him to have human companion. So, Skinny Pete decides to help Badger by solving his problem.
Badger has a machine which produces an array size of containing all integers from to exactly once i.e. . He will have to find a minimum integer which will be subtracted from every integers of array exactly once. After that, resulting array’s total value must be . By using his divine knowledge, Skinny Pete gives him the answer or tell him there’s no such . After hearing the solution, Badger returns to his family and Skinny Pere becomes lonely again.
Now, you have the machine Badger used to have. You have to find the answer to the problem or tell them there isn’t one. Note that you have to minimize the value of .
The first line will contain an integer .
Each line will contain two integers .
For each test case, print a single line containing an integer and it will have to be as minimum as possible. If there is no answer, print .
3 4 7 7 10 11 44355
0 1 -1
In first test case, the array is . of the array is . So we don’t have to subtract anything.
In second test case, of the array is . If we subtract from every element of the array, of the array will become .