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>
const char dl = '\n';
const long double eps = 0.00000001;
const long long MOD = 1e9 + 7;
const long long mod = 998244353;
const double PI = 3.141592653589793238463;
const long double pi = 4 * atan(1.0);
using namespace std;
void debug() { cout << endl; }
template <typename H, typename... T>
void debug(H p, T... t) {
  std::cout << p << " ";
  debug(t...);
}
int n, m, k;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
map<long long, int> was;
long long cnt[30000007];
int main() {
  fflush(stdin);
  cout << fixed, cout.precision(18);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, j;
  cin >> n;
  set<pair<long long, long long> > seta;
  long long a[n];
  vector<pair<long long, long long> > b;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
    if (!cnt[a[i]]) b.push_back({a[i], i});
    seta.insert({a[i], i});
    cnt[a[i]]++;
  }
  sort(b.begin(), b.end());
  if (b.size() == 1) {
    auto it = seta.upper_bound(b[0]);
    return cout << b[0].second + 1 << " " << (*it).second + 1, 0;
  }
  pair<long long, long long> ans = {b[0].second, b[1].second};
  long long best = lcm(b[0].first, b[1].first);
  for (i = 0; i < (int)b.size(); ++i) {
    if (b[i].first >= best) break;
    cnt[b[i].first]--;
    for (long long j = b[i].first; j < best && j <= 10000000; j += b[i].first) {
      {
        if (cnt[j]) {
          long long cur = lcm(b[i].first, j);
          if (cur < best) {
            best = cur;
            auto it = seta.lower_bound({j, -1});
            if (j == b[i].first) {
              it = seta.upper_bound({j, b[i].second});
            }
            ans = {b[i].second, (*it).second};
          }
          break;
        }
      }
    }
    cnt[b[i].first]++;
  }
  if (sqrt(n) < 100) {
    for (auto it : b) {
      for (auto it2 : b) {
        if (it2 != it) {
          long long cur = lcm(it.first, it2.first);
          if (cur < best) {
            best = cur;
            ans = {it.second, it2.second};
          }
        }
      }
    }
  }
  cout << min(ans.first + 1, ans.second + 1) << " "
       << max(ans.first + 1, ans.second + 1);
}
