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.io.BufferedInputStream;
import java.util.ArrayList;
import java.io.FilterInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        GMinimumPossibleLCM solver = new GMinimumPossibleLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class GMinimumPossibleLCM {
        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int[] index1 = new int[10000005];
            int[] index2 = new int[10000005];
            Arrays.fill(index1, -1);
            Arrays.fill(index2, -1);
            for (int i = 0; i < n; i++) {
                int temp = in.scanInt();
                if (index1[temp] == -1) index1[temp] = i;
                else if (index2[temp] == -1) index2[temp] = i;
            }


            long ans = Long.MAX_VALUE;
            int ans_i = -1;
            int ans_j = -1;
            for (int i = 1; i <= 10000000; i++) {
                ArrayList<pair<Integer, Integer>> arrayList = new ArrayList<>();
                for (int j = i; j <= 10000000 && arrayList.size() <= 2; j += i) {
                    if (index1[j] != -1) arrayList.add(new pair(j, index1[j]));
                    if (index2[j] != -1) arrayList.add(new pair(j, index2[j]));
                }
                if (arrayList.size() >= 2) {
                    if (ans > ((long) arrayList.get(0).f * arrayList.get(1).f) / i) {
                        ans = ((long) arrayList.get(0).f * arrayList.get(1).f) / i;
                        ans_i = arrayList.get(0).s;
                        ans_j = arrayList.get(1).s;
                    }
                }
            }

            if (ans_i > ans_j) ans_i = ans_i + ans_j - (ans_j = ans_i);
            if (ans_i == -1 || ans_j == -1 || ans_i == ans_j) throw new RuntimeException("NOP");
            out.println((ans_i + 1) + " " + (ans_j + 1));
        }

    }

    static class pair<T, T1> implements Cloneable {
        public T f;
        public T1 s;

        public pair(T f, T1 s) {
            this.f = f;
            this.s = s;
        }

        public pair<T, T1> clone() {
            return new pair<>(this.f, this.s);
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public int scanInt() {
            int integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}

