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.*;
import java.util.*;
public class contest{ 
                static FastReader sc=new FastReader();
                static PrintWriter out = new PrintWriter(System.out);
                static int mod=1000000007;
                static int intt(){
                       int x = sc.nextInt();
                       return(x);
                }
               static long longg(){
                          long x = sc.nextLong();
                           return(x);
                }
               static double doublee(){
                          double t = sc.nextDouble();
                           return(t);
                }
              static String str(){
                       String s = sc.next();
                         return(s);
                }
              static String strln(){

                        String s = sc.nextLine();
                           return(s);
              }
              static long pow(long a,long b){
                       long ans=1;
                      while(b>0){
                          if(b%2==1)
                              ans=(ans*a);
                              a=(a*a)%mod;
                              b=b/2;
                      }
                    return(ans);
                }
             static long GCD(long a,long b){
                           if(b%a==0)
                               return(a);
                               return(GCD(b%a,a));
              }
            static long LCM(long a,long b){
                         return ((a*b)/GCD(a,b));
               }
              static long Fermat(long a,long p){
                           long b = p-2,ans=1;
                            while(b>0){
                                 if(b%2==1)
                                      ans=(ans*a)%p;
                                       a=(a*a)%p;
                                       b=b/2;
                              }
                           return(ans);
                   }
              static void Fact(long a[],long m){
                              a[0]=1;
                           for(int i=1;i<a.length;i++)
                                   a[i]=(i*a[i-1])%m;

                      }
              static void Fact_Inv(long a[],long m){

                                 int n =a.length;
                                     a[n-1]=Fermat(a[n-1],m);
                                 for(int i=n-2;i>=0;i--)
                                        a[i]=((i+1)*a[i+1])%m;
                        }
               /*static  long d, x, y;
              static void extendedEuclid(long A, long B) {
                            if(B == 0) {
                                  d = A;
                                  x = 1;
                                  y = 0;
                              }
                           else {
                                extendedEuclid(B, A%B);
                                 long temp = x;
                                  x = y;
                                 y = temp - (A/B)*y;
                            }
                     } */
                 static class pair implements Comparable<pair>{
                       int x,y;
                      pair(int a,int b){
                             x=a;
                             y=b;
                       }
                     public int compareTo(pair p1)
                           { return((p1.x-p1.y)-(this.x-this.y));}
          
                   public boolean equals(Object obj) {
                         if (this == obj)
                                return true;
                        if (obj == null)
                                return false;
                        if (getClass() != obj.getClass())
                                return false;
                         pair other = (pair) obj;
                          if (x != other.x)
                                  return false;
                          if (y != other.y)
                                  return false;
                            return true;
                      }
                      @Override
                 public int hashCode() {
                      return(x-y);
                   } 
          }  

      static void addEdge(LinkedList<Integer> adjList[],int s,int d){
                             adjList[s].add(d);
                             adjList[d].add(s);
              }
       static int abs(char x,char y)
                   { return(Math.abs(x-y));}
        static int min(int x,int y){
                     return(Math.min(x,y));
                 }
        static int max(int a,int b){
                        return Math.max(a,b);
                  }    

      public static void main(String[] args){ 

                   int N = 10000007;
                   int n = intt();
                   long res=1000000000000000000l,first=0,second=0;
                   int cnt[] = new int[N];
                   int index[] = new int[N];

                    for(int i=0;i<n;i++){
                        int x = intt();
                        if(cnt[x]>0&&x<res){
                             res=x;
                             first=index[x];
                             second=i+1;
                        }
                      cnt[x]=1;
                      index[x]=i+1;
                  }
               
               for(int gcd=1;gcd<N;gcd++){
                       int gfirst=-1,gsecond=-1;
                       long a=0,b=0;
                     if(gcd>res)
                        break;
                   for(int j=gcd; j<N;j=j+gcd){
 
                           if(cnt[j]>0&&gfirst!=-1){  
                                 b=a;
                                 a=j;
                                 gsecond=gfirst;
                                 gfirst = index[j];
                                  break;
                            }              
                          else if(cnt[j]>0){
                               gfirst=index[j];
                               a=j;
                           }
                   }
                 if(gfirst!=-1&&gsecond!=-1){
                          long lcm =LCM(a,b);
                          if(res>lcm){
                             res=lcm;
                             first = min(gfirst,gsecond);
                             second = max(gfirst,gsecond); 
                          }    
                  }                
            }
               System.out.println(first+" "+second);  

    } 
         static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
}