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.util.stream.IntStream;

import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;

import java.io.*;

public class ProbA {
    
  
  
  private static StringTokenizer st;
    
    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }
    
    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }
    
    public static String next()
    {
        return st.nextToken();
    }
    
    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }
  
   
    void solve() throws IOException{
       
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
         int t=1;
         // t=nextInt();
         PrintWriter out = new PrintWriter(System.out);
         while(t!=0){
             nextLine(br);
            int n=nextInt();
            nextLine(br);
            int[][] cont=new int[2][10000001];
            for(int[] a : cont){
                Arrays.fill(a, -1);
            }
            int max=0;
            for(int i=0;i<n;i++){
                int x=nextInt();
                if(cont[0][x]==-1)  cont[0][x]=i+1;
                else 
                    cont[1][x]=i+1;
                if(x>max)
                    max=x;
            }
            long ans = Long.MAX_VALUE;
            int iii = -1;
            int jjj = -1;
                
            for(int i=1;i<=max;i++){
                ArrayList<pair> aa = new ArrayList<>();
                for(int j=i;j<=max;j+=i){
                    if (cont[0][j] != -1 && cont[1][j] != -1) {
                        aa.add(new pair(j, cont[0][j]));
                        aa.add(new pair(j, cont[1][j]));
                    } else if (cont[0][j] != -1) {
                        aa.add(new pair(j, cont[0][j]));
                    }
 
                    if (aa.size() >= 2) {
                        break;
                    }
                }
                if (aa.size() >= 2 && ((aa.get(0).val * aa.get(1).val) / i) < ans) {
                    ans = (aa.get(0).val * aa.get(1).val) / i;
                    iii = aa.get(0).index;
                    jjj = aa.get(1).index;
                }
                }
        
                out.print((int)Math.min(iii,jjj)+" "+(int)Math.max(iii,jjj));
           


            t--;
         }
      
       
        out.close();
    }
    class pair {
        long val;
        int index;

        public pair(long val, int index) {
            this.val = val;
            this.index = index;
        }

    }
    



    public static void main(String[] args) throws IOException {
        new Thread(null, new Runnable() {
            public void run() {
                try {
                    new ProbA().solve();
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (StackOverflowError e) {
                    System.out.println("RTE");
                }
            }
        }, "1", 1 << 26).start();
    }

   
    }

    
    