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 maxn = (int)1e6 + 5;
const long long maxx = (long long)10000001;
const int maxm = (int)2e3 + 5;
const int INF = 0x3f3f3f3f;
const long long inf = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-6;
const int MOD = (int)1e9 + 7;
template <class T>
inline void read(T &x) {
  x = 0;
  T flag = 1;
  char c;
  do {
    c = (char)getchar();
    if (c == '-') break;
  } while (c < '0' || c > '9');
  if (c == '-') {
    c = '0', flag = -1;
  }
  do {
    x = x * 10 + c - '0';
    c = (char)getchar();
  } while (c >= '0' && c <= '9');
  x *= flag;
}
template <class T>
inline void out(T x) {
  if (x > 9) out(x / 10);
  x = x % 10;
  putchar('0' + x);
}
int value[maxx][2];
int main() {
  int n;
  read(n);
  int x;
  for (int i = 1; i <= n; i++) {
    read(x);
    if (value[x][0] != 0) {
      value[x][1] = i;
    } else {
      value[x][0] = i;
    }
  }
  long long ans = 1LL * maxx * maxx;
  int ansx = 1, ansy = 1;
  int vsize = 0;
  int v[2];
  for (int i = 1; i < maxx; ++i) {
    if (i >= ans) {
      break;
    }
    vsize = 0;
    long long tmp = i;
    for (int j = 1; j * i < maxx; ++j) {
      if (value[j * i][0] != 0) {
        v[vsize] = value[j * i][0];
        ++vsize;
        tmp *= j;
        if (vsize >= 2) {
          break;
        }
      }
      if (value[j * i][1] != 0) {
        v[vsize] = value[j * i][1];
        ++vsize;
        tmp *= j;
        if (vsize >= 2) {
          break;
        }
      }
    }
    if (vsize < 2) {
      continue;
    }
    if (tmp < ans) {
      ans = tmp;
      ansx = v[0];
      ansy = v[1];
    }
  }
  if (ansx > ansy) {
    int tmp = ansx;
    ansx = ansy;
    ansy = tmp;
  }
  printf("%d %d\n", ansx, ansy);
  return 0;
}
