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
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        r552G solver = new r552G();
        solver.solve(1, in, out);
        out.close();
    }

    static class r552G {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.ni();
            int[] a = in.na(n);
            int MAX = 10_000_001;
            int[] nums = new int[MAX];
            int[][] idx = new int[2][MAX];
            Arrays.fill(idx[0], -1);
            for (int i = 0; i < n; i++) {
                nums[a[i]]++;
                if (idx[0][a[i]] != -1)
                    idx[1][a[i]] = i;
                else
                    idx[0][a[i]] = i;
            }
            long best = (long) MAX * MAX;
            int bestI = -1, bestJ = -1;
            for (int div = 1; div < MAX; div++) {
                int cur = div;
                int first = -1;
                while (cur < MAX) {
                    if (nums[cur] != 0) {
                        if (nums[cur] > 1 && first == -1) {
                            if ((long) cur / div * cur < best) {
                                best = (long) cur / div * cur;
                                bestI = idx[0][cur];
                                bestJ = idx[1][cur];
                            }
                            break;
                        } else if (first == -1) {
                            first = cur;
                        } else {
                            if ((long) cur / div * first < best) {
                                best = (long) cur / div * first;
                                bestI = idx[0][first];
                                bestJ = idx[0][cur];
                            }
                            break;
                        }
                    }
                    cur += div;
                }
            }
            out.printf("%d %d%n", Math.min(bestI + 1, bestJ + 1), Math.max(bestI + 1, bestJ + 1));
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

        public int[] na(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) a[i] = ni();
            return a;
        }

    }
}

