You are given an array a consisting of n integers a_1, a_2, ..., a_n.

Your problem is to find such pair of indices i, j (1 ≤ i < j ≤ n) that lcm(a_i, a_j) is minimum possible.

lcm(x, y) is the least common multiple of x and y (minimum positive number such that both x and y are divisors of this number).

Input

The first line of the input contains one integer n (2 ≤ n ≤ 10^6) — the number of elements in a.

The second line of the input contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^7), where a_i is the i-th element of a.

Output

Print two integers i and j (1 ≤ i < j ≤ n) such that the value of lcm(a_i, a_j) is minimum among all valid pairs i, j. If there are multiple answers, you can print any.

Examples

Input


5
2 4 8 3 6


Output


1 2


Input


5
5 2 11 3 7


Output


2 4


Input


6
2 5 10 1 10 2


Output


1 4
#include <bits/stdc++.h>
using namespace std;
int main() {
  using i64 = int64_t;
  cout.tie(nullptr)->sync_with_stdio(false);
  cin.exceptions(cin.failbit);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int& a : A) {
    cin >> a;
  }
  int ma = *max_element(A.begin(), A.end());
  vector<int> bloom(ma + 1);
  for (int i = 0; i < N; ++i) {
    bloom[A[i]]++;
  }
  i64 mi = LLONG_MAX / 2;
  array<int, 2> res{};
  for (int g = 1; g <= ma; ++g) {
    int a = -1, b = -1;
    for (int m = g; m <= ma; m += g) {
      int q = bloom[m];
      for (int w = 0; w < q && b == -1; ++w) {
        if (a == -1)
          a = m;
        else
          b = m;
      }
      if (a != -1 && b != -1) {
        if (i64(a) / g * b < mi) {
          mi = i64(a) / g * b;
          res = {a, b};
        }
      }
    }
  }
  int a = -1, b = -1;
  for (int i = 0; i < N; ++i) {
    if (a != -1 && b != -1) break;
    if (a == -1 && A[i] == res[0])
      a = i;
    else if (b == -1 && A[i] == res[1])
      b = i;
  }
  if (a >= b) swap(a, b);
  cout << a + 1 << ' ' << b + 1 << '\n';
}
