You are given a list of integers. Here, is an even number. These integers must be distributed into pairs and the power of each of the pairs is added.
The power of a pair consisting of the and number is defined as the XOR of the two numbers and .
Write a program to determine the minimum and the maximum possible sum of the pairs.
Input format
Output format
The output consists of two space-separated integers. The first is the minimum possible sum and the second is the maximum possible sum.
Constraints
fits in integer value.
In a sample case, the following combinations are possible:
->
->
->