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 INF = 1e9;
const int N = 10 * 1000 * 1000 + 11;
int n;
vector<int> a;
int mind[N];
pair<int, int> mins[N];
vector<pair<int, int> > divs;
void build_sieve() {
  vector<int> pr;
  mind[0] = mind[1] = 1;
  for (int i = 2; i < N; ++i) {
    if (mind[i] == 0) {
      pr.push_back(i);
      mind[i] = i;
    }
    for (int j = 0; j < int(pr.size()) && pr[j] <= mind[i] && i * pr[j] < N;
         ++j) {
      mind[i * pr[j]] = pr[j];
    }
  }
}
void add_to_mins(int curd, int idx) {
  if (mins[curd].first == -1)
    mins[curd].first = idx;
  else if (mins[curd].second == -1)
    mins[curd].second = idx;
}
void rec(int pos, int curd, int idx) {
  if (pos == int(divs.size())) {
    add_to_mins(curd, idx);
    return;
  }
  int curm = 1;
  for (int i = 0; i <= divs[pos].second; ++i) {
    rec(pos + 1, curd * curm, idx);
    curm *= divs[pos].first;
  }
}
void add(int idx) {
  int value = a[idx];
  divs.clear();
  while (value > 1) {
    int d = mind[value];
    if (!divs.empty() && divs.back().first == d) {
      ++divs.back().second;
    } else {
      divs.push_back(make_pair(d, 1));
    }
    value /= d;
  }
  rec(0, 1, idx);
}
int main() {
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < N; i++) mins[i] = make_pair(-1, -1);
  build_sieve();
  vector<pair<int, int> > vals;
  for (int i = 0; i < n; i++) vals.push_back(make_pair(a[i], i));
  sort(vals.begin(), vals.end());
  for (int i = 0; i < n; ++i) {
    if (i > 1 && vals[i].first == vals[i - 2].first) continue;
    add(vals[i].second);
  }
  long long l = INF * 1ll * INF;
  int ansi = -1, ansj = -1;
  for (int i = 1; i < N; ++i) {
    pair<int, int> idxs = mins[i];
    if (idxs.second == -1) continue;
    long long curl = a[idxs.first] * 1ll * a[idxs.second] / i;
    if (l > curl) {
      l = curl;
      ansi = min(idxs.first, idxs.second);
      ansj = max(idxs.first, idxs.second);
    }
  }
  cout << ansi + 1 << " " << ansj + 1 << endl;
  return 0;
}
