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;
using ll = long long;
using Pii = pair<int, int>;
using Vi = vector<int>;
void run();
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(18);
  run();
  return 0;
}
int uplg(int n) { return 32 - __builtin_clz(n); }
int uplg(ll n) { return 64 - __builtin_clzll(n); }
int inds[int(1e7 + 1)];
void run() {
  int n;
  cin >> n;
  int M = 0;
  pair<ll, Pii> ans = {INT64_MAX, {0, 0}};
  for (int i = (0); i < (n); i++) {
    int k;
    cin >> k;
    if (inds[k]) {
      pair<ll, Pii> alt = {k, {inds[k], i + 1}};
      ans = min(ans, alt);
    } else {
      inds[k] = i + 1;
    }
    M = max(M, k + 1);
  }
  for (int d = (1); d < (M); d++) {
    Pii a = {INT_MAX, INT_MAX}, b = {INT_MAX, INT_MAX};
    for (int k = d; k <= M; k += d) {
      int i = inds[k];
      if (!i) continue;
      Pii alt = {k, i};
      if (alt < a) {
        b = a;
        a = alt;
      } else {
        b = min(b, alt);
      }
    }
    if (a.first != INT_MAX && b.first != INT_MAX) {
      pair<ll, Pii> alt = {ll(a.first) * b.first / d, {a.second, b.second}};
      ans = min(ans, alt);
    }
  }
  if (ans.second.first > ans.second.second)
    swap(ans.second.first, ans.second.second);
  cout << ans.second.first << ' ' << ans.second.second << endl;
}
