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 G {
	
	static final int N = 10000000;
	public static void main(String... args) throws Exception {
		int[] sieve = new int[N+1];
		Arrays.fill(sieve, -1);
		for(int i = 2; i <= N; i++){
			if(sieve[i] == -1){
				sieve[i] = i;
				for(long j = (long)i*(long)i; j <= (long)N; j += (long)i){
					sieve[(int)j] = i;
				}
			}
		}
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] arr = new int[n];
		StringTokenizer st = new StringTokenizer(br.readLine());
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(st.nextToken());
		}
		int[] pos = new int[N+1];
		Arrays.fill(pos, -1);
		long min = Long.MAX_VALUE; int a = 0, b = 0;
		for(int i = 0; i < n; i++){
			if(pos[arr[i]] >= 0 && arr[i] < min){
				min = arr[i]; a = i; b = pos[arr[i]];
			}
			else{
				pos[arr[i]] = i;
			}
		}
		
			int[] next = new int[N+1];
			Arrays.fill(next, -1);
			for(int i = N; i >= 1; i--){
				if(pos[i] >= 0) {
					if(next[i] >= 0){
						long thisval = arr[next[i]];
						if(thisval < min){
							min = thisval; a = next[i]; b = pos[i];
						}
					}
					next[i] = pos[i];
				}
				if(next[i] >= 0){
					int aux = i;
					int p = sieve[i];
					while(p > 0){
						if(next[i/p] >= 0 && next[i/p] != next[i]){
							long bla = arr[next[i/p]];
							long ble = arr[next[i]];
							long thisval = bla*ble/((long)i/p);
							if(thisval < min){
								min = thisval; a = next[i/p]; b = next[i];
							}
							if(arr[next[i]] < arr[next[i/p]]){
								next[i / p] = next[i];
							}
						}
						else{
							next[i / p] = next[i];
						}
						while(aux % p == 0) aux /= p;
						p = sieve[aux];
					}
				}
			}
			System.out.printf("%d %d\n",Integer.min(a+1,b+1),Integer.max(a+1,b+1));
		
	}
}
