- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a list of integers, . Your task is to pick two numbers and () from the list such that the product has the maximum number of 1 bits in its binary representation.
Input
The first line contains a single integer , the size of the list. The second line contains integers , the elements of the list.
Output
On the first line, print a single integer: the maximum number of 1 bits in the product.
On the second line, print two integers, the values and , such that their product has the maximum number of 1 bits in its binary representation. If there are multiple valid answers, print any of them.
Constraints
Example
Input:
5 2 3 7 10 15
Output:
4 3 15