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
/*
Keep solving problems.
*/

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

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000L * 1000L * 1000L + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    long res = Long.MAX_VALUE;
    int first = -1;
    int second = -1;
    void solve() throws IOException {
        int n = nextInt();
        int LIMIT = 10 * 1000 * 1000 + 10;
        int[] arr = nextIntArr(n);
        int[] hist = new int[LIMIT];
        for (int i = 0; i < n; i++) {
            hist[arr[i]]++;
        }
        for (int i = 1; i < LIMIT; i++) {
            int t1 = -1;
            int t2 = -1;
            for (int j = i; j < LIMIT; j += i) {
                if (hist[j] > 1) {
                    check(i, j, j);
                }
                if (hist[j] > 0) {
                    if (t1 == -1) {
                        t1 = j;
                    } else if (t2 == -1) {
                        t2 = j;
                    } else {
                        break;
                    }
                }
            }
            if (t1 != -1 && t2 != -1) {
                check(i, t1, t2);
            }
        }

        int i1 = -1;
        int i2 = -1;
        for (int i = 0; i < n; i++) {
            if (i1 == -1 && arr[i] == first) {
                i1 = i;
            }
        }
        for (int i = 0; i < n; i++) {
            if (i2 == -1 && i != i1 && arr[i] == second) {
                i2 = i;
            }
        }
        if (i1 < i2) {
            outln((i1 + 1) + " " + (1 + i2));
        } else {
            outln((i2 + 1) + " " + (1 + i1));
        }
    }

    void check(int j, int v1, int v2) {
        long tmp = 1L * v1 / j * v2;
        if (res > tmp) {
            res = tmp;
            first = v1;
            second = v2;
        }
    }

    void shuffle(long[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            long tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}