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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        GMinimalnoVozmozhniiLCM solver = new GMinimalnoVozmozhniiLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class GMinimalnoVozmozhniiLCM {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] idx = new int[(int) 1e7 + 1];
            Arrays.fill(idx, -1);

            long min = Long.MAX_VALUE;
            long fs = 0, sc = 0;

            for (int i = 0; i < n; i++) {
                int a = in.nextInt();
                if (idx[a] == -1) {
                    idx[a] = i;
                } else {
                    if (min > a) {
                        min = a;
                        fs = idx[a];
                        sc = i;
                    }
                }
            }

            for (int i = 1; i <= (int) 1e7; i++) {
                long firstIdx = -1;
                long firstNum = -1;
                for (int h = i; h <= (int) 1e7; h += i) {
                    if (idx[h] == -1) {
                        continue;
                    }
                    if (firstIdx == -1) {
                        firstIdx = idx[h];
                        firstNum = h;
                    } else {
                        if (min > firstNum * h / i) {
                            min = firstNum * h / i;
                            fs = firstIdx;
                            sc = idx[h];
                        }
                        break;
                    }
                }
            }
            if (sc < fs) {
                long z = fs;
                fs = sc;
                sc = z;
            }
            out.println(String.format("%d %d", fs + 1, sc + 1));
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

