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.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
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;
        Scanner in = new Scanner(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, Scanner sc, PrintWriter pw) {
            int n = sc.nextInt();
            int[] arr = new int[n];
            int[] countSort = new int[(int) 1e7 + 1];
            for (int i = 0; i < n; i++) {
                arr[i] = sc.nextInt();
                countSort[arr[i]]++;
            }
            long min = Long.MAX_VALUE;
            int min1 = -1, min2 = -1;
            for (int i = 1; i <= (int) 1e7; i++) {
                int first = -1;
                int second = -1;
                for (int j = i; j <= (int) 1e7; j += i) {
                    int temp = countSort[j];
                    if (temp > 0 && first == -1) {
                        first = j;
                        temp--;
                    }
                    if (temp > 0) {
                        second = j;
                        break;
                    }
                }
                if (first == -1 || second == -1)
                    continue;
                long temp = 1l * i * (first / i) * (second / i);
                if (min > temp) {
                    min1 = first;
                    min2 = second;
                    min = temp;
                }
            }
            for (int i = 0; i < n; i++) {
                if (arr[i] == min1) {
                    pw.print(i + 1 + " ");
                    min1 = -1;
                } else if (arr[i] == min2) {
                    pw.print(i + 1 + " ");
                    min2 = -1;
                }
            }
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

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

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

    }
}

