Christmas is coming, Icy has just received a box of chocolates from her grandparents! The box contains n chocolates. The i-th chocolate has a non-negative integer type a_i.

Icy believes that good things come in pairs. Unfortunately, all types of chocolates are distinct (all a_i are distinct). Icy wants to make at least one pair of chocolates the same type. 

As a result, she asks her grandparents to perform some chocolate exchanges. Before performing any chocolate exchanges, Icy chooses two chocolates with indices x and y (1 ≤ x, y ≤ n, x ≠ y).

In a chocolate exchange, Icy's grandparents choose a non-negative integer k, such that 2^k ≥ a_x, and change the type of the chocolate x from a_x to 2^k - a_x (that is, perform a_x := 2^k - a_x).

The chocolate exchanges will be stopped only when a_x = a_y. Note that other pairs of equal chocolate types do not stop the procedure.

Icy's grandparents are smart, so they would choose the sequence of chocolate exchanges that minimizes the number of exchanges needed. Since Icy likes causing trouble, she wants to maximize the minimum number of exchanges needed by choosing x and y appropriately. She wonders what is the optimal pair (x, y) such that the minimum number of exchanges needed is maximized across all possible choices of (x, y).

Since Icy is not good at math, she hopes that you can help her solve the problem.

Input

The first line of the input contains a single integer n (2 ≤ n ≤ 2 ⋅ 10^5) — the number of chocolates.

The second line of the input contains n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ 10^9).

It is guaranteed that all a_i are distinct.

Output

Output three integers x, y, and m.

x and y are indices of the optimal chocolates to perform exchanges on. Your output must satisfy 1 ≤ x, y ≤ n, x ≠ y.

m is the number of exchanges needed to obtain a_x = a_y. We can show that m ≤ 10^9 for any pair of chocolates.

If there are multiple solutions, output any.

Examples

Input


5
5 6 7 8 9


Output


2 5 5


Input


2
4 8


Output


1 2 2

Note

In the first test case, the minimum number of exchanges needed to exchange a chocolate of type 6 to a chocolate of type 9 is 5. The sequence of exchanges is as follows: 6 → 2 → 0 → 1 → 7 → 9.

In the second test case, the minimum number of exchanges needed to exchange a chocolate of type 4 to a chocolate of type 8 is 2. The sequence of exchanges is as follows: 4 → 0 → 8.
5
0 3 1 2 4
 16
9260395 11200954 12565768 9097948 2148381 13208278 8853864 7915641 3971192 2777328 6820143 155663 11055052 2624039 6069297 9303161
 16
9260395 11200954 12565768 9097948 2148381 13208278 8853864 7915641 3971192 2777328 6820143 155663 11055052 2624039 6069297 9303161
 5
5 6 7 8 9
 73
565 927 81 544 585 496 213 892 13 630 162 547 55 241 988 985 950 287 108 515 639 104 225 836 799 797 313 992 525 393 914 26 612 381 429 231 398 775 528 674 472 42 101 158 531 35 666 785 573 192 107 763 392 245 337 440 588 133 32 448 380 776 729 378 382 495 126 832 607 288 858 746 627
 10
60253 56012 398 14855 99307 93134 50355 82806 42446 67694
 13
5 7 3 11 12 1 9 10 8 6 2 4 0
 2
7 9
 10
4 0 5 1 7 2 3 9 8 6
 10
60253 56012 398 14855 99307 93134 50355 82806 42446 67694
 2
8 6
 73
565 927 81 544 585 496 213 892 13 630 162 547 55 241 988 985 950 287 108 515 639 104 225 836 799 797 313 992 525 393 914 26 612 381 429 231 398 775 528 674 472 42 101 158 531 35 666 785 573 192 107 763 392 245 337 440 588 133 32 448 380 776 729 378 382 495 126 832 607 288 858 746 627
 8
7133779 11010202 10352361 12948862 2541393 5835697 6588686 9297238
 2
0 1
 2
38 22
 3
7 9 23
 2
4 12
 2
1000000000 1
 3
23 9 7
 13
5 7 3 11 12 1 9 10 8 6 2 4 0
 2
9 7
 3
2 23 27
 8
7133779 11010202 10352361 12948862 2541393 5835697 6588686 9297238
 100
992 505 272 422 137 719 29 841 468 494 460 284 914 776 524 482 115 132 116 92 577 666 560 36 700 366 899 21 939 265 975 967 165 964 783 539 241 712 683 412 592 233 854 471 384 999 97 257 563 811 714 375 860 11 901 981 850 133 160 232 991 508 693 296 997 223 649 566 716 703 305 204 307 746 635 464 512 404 457 195 290 127 868 663 814 553 604 790 537 987 951 743 47 357 153 493 13 601 490 530
 2
4 8
 10
4 0 5 1 7 2 3 9 8 6
 2
529 302
 17
11 13 8 3 5 10 0 1 15 14 9 7 4 16 6 12 2
 3
2 23 27
 32
823660 11344325 5298940 6280378 15694184 3424995 2140609 13618136 8594136 11132237 7864395 9307374 2549838 3716880 8109447 1989734 12950900 14771702 15314771 1563916 15846364 10489467 3074912 7059563 8946652 5477362 5922853 16291445 3508052 16086447 10352431 277463
 17
11 13 8 3 5 10 0 1 15 14 9 7 4 16 6 12 2
 5
0 3 1 2 4
 50
42 39 27 31 49 28 44 48 1 4 22 6 30 34 37 3 15 7 19 32 12 38 8 16 17 36 41 24 13 40 9 26 2 47 25 18 46 23 20 5 10 33 29 21 43 45 0 11 35 14
 3
681 1365 2
 2
13 27

2 4 3
 1 2 35
 1 2 35
 5 2 5
 40 1 14
 1 2 21
 4 8 7
 2 1 1
 3 10 5
 1 2 21
 2 1 3
 40 1 14
 8 1 32
 2 1 1
 2 1 4
 3 1 2
 2 1 1
 1 2 14
 1 3 2
 4 8 7
 1 2 1
 2 3 6
 8 1 32
 39 43 18
 2 1 2
 3 10 5
 2 1 11
 1 6 7
 2 3 6
 10 30 31
 1 6 7
 2 4 3
 45 1 11
 2 1 18
 2 1 3

#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;

using namespace __gnu_pbds;
template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k) -> iterator of kth element (in sorted fashion : low - high)
// order_of_key(x) -> #numbers strictly less than x

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

#define sync ios_base::sync_with_stdio(0); cin.tie(0);
#define all(x) x.begin(),x.end()
#define unq(a) sort(all(a));a.resize(unique(all(a)) - a.begin())
#define fi first
#define se second
//#define endl '\n'
 
using ll = long long;
using ld = long double;
using pii = pair<int , int>;
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//mt19937 rng(0);

int main(){
  sync
  #ifndef ONLINE_JUDGE 
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif

  int tt = 1;
  //cin >> tt;

  while(tt--){
    int n;
    cin >> n;
    vector<int> a(n), rm(n), mk(n);
    for (int& x : a) cin >> x;
    
    vector<vector<int>> sq;

    auto rmv = [&](int x){
      int cnt = 0;
      vector<int> s;
      while(x){
        s.push_back(x);
        cnt++;
        if (__builtin_popcount(x) == 1){
          x = 0;
        }
        else{
          int tx = x, vl = 1;
          x = 0;
          while(tx){
            if (1 - (tx & 1)){
              x += vl;
            }
            vl <<= 1;
            tx >>= 1;
          }
          x++;
        }
      }
      s.push_back(0);
      sq.push_back(s);
      return cnt;
    };

    sort(all(a));
    int cnt = 0;
    map<int , int> idx;
    for (int i = 0; i < n; i++){
      rmv(a[i]);
      idx[a[i]] = i + 1;
    }
    map<int , int> cc, rcc;
    for (auto& s : sq){
      for (int x : s){
        cc[x] = 0;
      }
    }
    int m = 0;
    for (pii x : cc){
      cc[x.fi] = ++m;
      rcc[m] = x.fi;
    }
    vector<vector<int>> g(m + 1);
    for (auto& s : sq){
      for (int i = 1; i < s.size(); i++){
        g[cc[s[i - 1]]].push_back(cc[s[i]]);
        g[cc[s[i]]].push_back(cc[s[i - 1]]);
      }
    }

    for (int i = 1; i <= m; i++){
      unq(g[i]);
      // cout << rcc[i] << " :: " << endl;
      // for (int x : g[i])
      //   cout << rcc[x] << " ";
      // cout << endl;
    }

    struct data{
      array<int , 3> close;
      array<int , 2> open;
    };
    // A tree with max log(ai) length, root value = 0
    function<data(int c, int p)> dfs = [&](int c, int p){
      data ans; // {max close path length , max open length till c}
      ans.close[0] = 0; ans.close[1] = ans.close[2] = -1;
      ans.open[0] = ans.open[1] = -1;

      multiset<pii> big2;
      if (binary_search(all(a) , rcc[c])){
        big2.insert({0, c});
        ans.open[0] = 0; ans.open[1] = rcc[c];
      }
      for (const int& x : g[c]){
        if (x == p)
          continue;
        data dt = dfs(x, c);
        if (dt.close[0] > ans.close[0]){
          ans.close = dt.close;
        }
        dt.open[0]++;
        if (dt.open[0] > ans.open[0]){
          ans.open = dt.open;
        }
        if (dt.open[0] > 0){
          big2.insert({dt.open[0] , dt.open[1]});
        }
        if (big2.size() > 2){
          big2.erase(big2.begin());
        }
      }
      if (big2.size() == 2 && big2.begin()->fi + big2.rbegin()->fi > ans.close[0]){
        ans.close = {big2.begin()->fi + big2.rbegin()->fi, big2.begin()->se, big2.rbegin()->se};
      }
      return ans;
    };
    data ans = dfs(cc[0], -1);
    cout << idx[ans.close[1]] << " " << idx[ans.close[2]] << " " << ans.close[0] << endl;
  }
 
  cerr << "processor time: " << clock() / (double) CLOCKS_PER_SEC << "s    ";
  return 0;
}