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
//package codeforces;

import java.io.*;
import java.util.*;

public class MinimumLCM {
    private static int N;
    private static int[] inputs;
    private static int MAX_VALUE = 10000000;
    private static int[] indexes = new int[MAX_VALUE + 1];
    private static int[] indexes2 = new int[MAX_VALUE + 1];

    private static void solveProblem(InputStream instr) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(instr)));
        N = sc.nextInt();
        inputs = new int[N];
        Arrays.fill(indexes, -1);
        Arrays.fill(indexes2, -1);

        for (int i = 0; i < N; i++) {
            inputs[i] = sc.nextInt();
            if (indexes[inputs[i]] != -1) {
                if (indexes2[inputs[i]] == -1) {
                    indexes2[inputs[i]] = i;
                }
            } else {
                indexes[inputs[i]] = i;
            }
        }
        Object result = solveTestCase();
        System.out.println(result);
    }

    private static Object solveTestCase() {
        int min1 = MAX_VALUE, min2 = MAX_VALUE;
        int max = 0;
        for (int i = 0; i < N; i++) {
            if (inputs[i] < min2) {
                min2 = inputs[i];
                if (inputs[i] < min1) {
                    min2 = min1;
                    min1 = inputs[i];
                }
            }
            if (inputs[i] > max) {
                max = inputs[i];
            }
        }

        long minLCM = 1L * min1 * min2;
        int lcmIndex1 = indexes[min1], lcmIndex2 = (min1 == min2) ? indexes2[min1] : indexes[min2];

        for (int gcd = 2; gcd <= max; gcd++) {
            if (gcd > minLCM) {
                break;
            }
            int index1 = -1;
            int index2 = -1;
            long thisGcd = -1;
            for (int i = gcd; i <= MAX_VALUE; i += gcd) {
                thisGcd = gcd;

                if (indexes[i] != -1) {
                    if (index1 == -1) {
                        index1 = indexes[i];
                        if (indexes2[i] != -1) {
                            index2 = indexes2[i];
                            break;
                        }
                    } else {
                        index2 = indexes[i];
                        break;
                    }
                }
            }
            if (index1 != -1 && index2 != -1) {
                long lcm = (inputs[index1] / thisGcd) * inputs[index2];
                if (lcm < minLCM) {
                    minLCM = lcm;
                    lcmIndex1 = index1;
                    lcmIndex2 = index2;
                }
            }
        }
        lcmIndex1++;
        lcmIndex2++;
        return lcmIndex1 < lcmIndex2 ? (lcmIndex1 + " " + lcmIndex2) : (lcmIndex2 + " " +
                                                                        lcmIndex1);
    }

    public static void main(String[] args) throws Exception {
        long currTime = System.currentTimeMillis();
        solveProblem(System.in);
       // solveProblem(new FileInputStream(new File("input.in")));
        //   System.out.println("Time: " + (System.currentTimeMillis() - currTime));
    }

}
