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;
const int dominio = 10000000;
vector<int> sieve(dominio + 1);
vector<int> pos1(dominio + 1), pos2(dominio + 1);
long long mcd(long long a, long long b) {
  while (a % b != 0) {
    long long k = a % b;
    a = b;
    b = k;
  }
  return b;
}
long long mcm(long long a, long long b) {
  long long ans;
  ans = a * b;
  ans /= mcd(a, b);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, x, p1, p2, x1, x2, z1, z2, i, j;
  long long lcm;
  cin >> n;
  vector<int> V(n);
  for (i = 0; i < n; i++) {
    cin >> V[i];
  }
  lcm = mcm(V[0], V[1]);
  p1 = 1;
  p2 = 2;
  for (i = 0; i <= dominio; i++) {
    sieve[i] = 1;
    pos1[i] = 0;
    pos2[i] = 0;
  }
  for (i = 0; i < n; i++) {
    if (pos1[V[i]] == 0)
      pos1[V[i]] = i + 1;
    else
      pos2[V[i]] = i + 1;
  }
  for (i = 1; i <= dominio; i++) {
    if (i > lcm) break;
    if (sieve[i] == 1) {
      x1 = 0;
      x2 = 0;
      z1 = 0;
      z2 = 0;
      for (j = i; j <= dominio; j += i) {
        if (x1 == 0) {
          if (pos1[j] != 0) {
            x1 = j;
            z1 = pos1[j];
            if (pos2[j] != 0) {
              x2 = j;
              z2 = pos2[j];
              break;
            }
          }
        } else if (x2 == 0) {
          if (pos1[j] != 0) {
            x2 = j;
            z2 = pos1[j];
            break;
          }
        }
      }
      if (x1 != 0 && x2 != 0) {
        if (mcm(x1, x2) < lcm) {
          lcm = mcm(x1, x2);
          p1 = z1;
          p2 = z2;
        }
      } else if (i >= 2) {
        for (j = 2 * i; j <= dominio; j += i) {
          sieve[j] = 0;
        }
      }
    }
  }
  if (p1 > p2) {
    int k = p1;
    p1 = p2;
    p2 = k;
  }
  cout << p1 << " " << p2 << '\n';
}
