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>
static void print_int(int64_t n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  if (n == 0) {
    putchar('0');
    return;
  }
  int s[20], len = 0;
  while (n > 0) {
    s[len++] = n % 10 + '0';
    n /= 10;
  }
  while (len > 0) {
    putchar(s[--len]);
  }
}
static int64_t read_int(void) {
  int prev = '\0';
  int c = getchar();
  while (!('0' <= c && c <= '9')) {
    prev = c;
    c = getchar();
  }
  int64_t res = 0;
  while ('0' <= c && c <= '9') {
    res = 10 * res + c - '0';
    c = getchar();
  }
  return prev == '-' ? -res : res;
}
int32_t gcd(int32_t a, int32_t b) {
  int32_t r = a % b;
  while (r > 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int64_t lcm(int32_t a, int32_t b) { return (int64_t)a / gcd(a, b) * b; }
void run(void) {
  int32_t n = read_int();
  int32_t *a = (int32_t *)calloc(n, sizeof(int32_t));
  for (int32_t i = 0; i < n; ++i) {
    a[i] = read_int();
  }
  const int32_t m = 10000000;
  int32_t *f = (int32_t *)calloc(m + 1, sizeof(int32_t));
  for (int32_t i = 1; i <= m; ++i) {
    f[i] = i;
  }
  for (int32_t i = 2; i * i <= m; ++i) {
    if (f[i] != i) continue;
    for (int32_t j = i * i; j <= m; j += i) {
      f[j] = i;
    }
  }
  int32_t *top2 = (int32_t *)calloc((m + 1) * 2, sizeof(int32_t));
  memset(top2, -1, sizeof(int32_t) * 2 * (m + 1));
  int32_t *factor = (int32_t *)calloc(1000, sizeof(int32_t));
  for (int32_t i = 0; i < n; ++i) {
    factor[0] = 1;
    int32_t len = 1;
    for (int32_t t = a[i], c = 0; t > 1; len *= c + 1, c = 0) {
      int32_t p = f[t];
      while (t % p == 0) {
        t /= p;
        c++;
      }
      int64_t mul = p;
      for (int32_t j = 1; j <= c; ++j, mul *= p) {
        for (int32_t k = 0; k < len; ++k) {
          factor[j * len + k] = mul * factor[k];
        }
      }
    }
    for (int32_t j = 0; j < len; ++j) {
      const int32_t d = factor[j];
      int32_t ok = 0;
      for (int32_t k = 0; k < 2; ++k) {
        if (top2[2 * d + k] == -1) {
          top2[2 * d + k] = i;
          ok = 1;
          break;
        }
      }
      if (ok) continue;
      int32_t max = a[top2[2 * d + 0]] < a[top2[2 * d + 1]] ? 1 : 0;
      if (a[i] < a[top2[2 * d + max]]) {
        top2[2 * d + max] = i;
      }
    }
  }
  int64_t min = (int64_t)a[top2[2]] * a[top2[3]];
  int32_t index[2] = {top2[2], top2[3]};
  for (int32_t i = 2; i <= m; ++i) {
    if (top2[2 * i + 1] == -1) continue;
    int32_t x = top2[2 * i + 0];
    int32_t y = top2[2 * i + 1];
    int64_t l = lcm(a[x], a[y]);
    if (l < min) {
      min = l;
      index[0] = x;
      index[1] = y;
    }
  }
  int32_t x = index[0] < index[1] ? index[0] : index[1];
  int32_t y = index[0] + index[1] - x;
  print_int(x + 1);
  putchar(' ');
  print_int(y + 1);
  puts("");
}
int main(void) {
  run();
  return 0;
}
