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.*;
import java.util.*;

public class G_MinimumPossibleLCM {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();
    }

    private static class Solver {
        private void solve(InputReader inp, PrintWriter out) {
            int n = inp.nextInt();
            boolean[] vis = new boolean[10000001];
            int[] index = new int[10000001];
            long result = Long.MAX_VALUE, indexA = -1, indexB = -1;
            for (int i = 1; i <= n; i++) {
                int u = inp.nextInt();
                if (vis[u]) {
                    if (u < result) {
                        result = u;
                        indexA = i;
                        indexB = index[u];
                    }
                } else {
                    vis[u] = true;
                    index[u] = i;
                }
            }

            for (int i = 1; i <= 10000000; i++) {
                int a = -1, b = -1;
                for (int j = 0; j <= 10000000; j += i) {
                    if (vis[j]) {
                        if (a == -1) a = j;
                        else {
                            b = j;
                            break;
                        }
                    }
                }
                if (a != -1 && b != -1 && (long) a * b / i < result) {
                    result = (long) a * b / i;
                    indexA = index[a];
                    indexB = index[b];
                }
            }
            if (indexA < indexB) out.println(indexA + " " + indexB);
            else out.println(indexB + " " + indexA);

        }
    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        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());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}