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



public class Main {
    private static final int MAX = 1000*1000*10;
    private static ArrayList<Integer> [] G = new ArrayList[MAX+1];

    public static void main(String[] args) throws Exception {
        IO io ;
        try {
            io = new IO("in.in", null);
        } catch (IOException e) {
            io = new IO(null, null);
        }
        int n = io.getNextInt();
        int [] A = new int[n];
        for (int i = 0;i < n;i++) {
            A[i] = io.getNextInt();
            if (G[A[i]] == null) G[A[i]] = new ArrayList<>();
            G[A[i]].add(i);
        }
        cand ans = new cand(-1,-1,1L << 60);
        ArrayList<Integer> idx = new ArrayList<>();
        for (int g = 1;g <= MAX;g++){
            idx.clear();
            for (int m = g;m <= MAX && idx.size() < 2;m += g) {
                if (G[m] == null) continue;
                for (int i : G[m]) {
                    if (idx.size() >= 2) break;
                    idx.add(i);
                }
            }
            if (idx.size() >= 2) {
                int i = idx.get(0),j = idx.get(1);
                long c = A[i]*(long)A[j]/g;
                cand tmp = new cand(i+1,j+1,c);
                if (ans.compareTo(tmp) > 0)
                    ans = tmp;
            }
        }
        io.println(ans.a + " " + ans.b);
        io.close();
    }
    private static final int onebillion7 = 1000000007;
}

class cand implements Comparable<cand>{
    int a,b;
    long lcm;
    public cand(int x,int y,long l) {
        a = Math.min(x,y);
        b = x+y-a;
        lcm = l;
    }
    private int sgn(long x) {
        if (x > 0) return 1;
        if (x < 0) return -1;
        return 0;
    }
    @Override
    public int compareTo(cand o) {
        return sgn(lcm-o.lcm);
    }
}


class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}
