#icpc2013summerwarmingUpf. [icpc2013summer_warmingUp_f]Maximum Segment XOR
[icpc2013summer_warmingUp_f]Maximum Segment XOR
Description
XOR is the operation as basic as addition for programmers.
Genius programmer KM made the following problem to test his disciple wata.
Given integers , find the two integers and () such that is maximum possible.
wata couldn't solve this problem, so he asked you, the friend of him and the excellent programmer, to solve this problem for him.
Input
The first line of the input file contains ().
The second line contains integers ().
Output
Output the maximal value and the pair of which gives the maximum.
If there are multiple pairs, output the lexicographically smallest one.
Sample Input
5
1 2 3 4 5
Sample Output
7 3 4
Sample Input
3
3 3 3
Sample Output
3 1 1
Sample Input
4
1 2 4 8
Sample Output
15 1 4