- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a list of n integers, a_1, a_2, \dots, a_n. Your task is to pick two numbers a_i and a_j (1 \leq i < j \leq n) from the list such that the product a_i \cdot a_j has the maximum number of 1 bits in its binary representation.
Input
The first line contains a single integer n, the size of the list. The second line contains n integers a_1, a_2, \dots, a_n, 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 a_i and a_j, 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
- 2 \leq n \leq 10^4
- 1 \leq a_i \leq 10^9
Example
Input:
5 2 3 7 10 15
Output:
4 3 15