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

public class CF1154G {
	long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); }
	long lcm(long a, long b) { return a / gcd(a, b) * b; }
	final int MAX = (int) 1e7 + 1;
	final int prime1 = (int) 1e9 + 7;
	final int prime2 = (int) 1e9 + 9;
	public CF1154G() {
		FS scan = new FS();
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] freq = new int[MAX];
		for(int i = 0 ; i < n ; i++) freq[a[i] = scan.nextInt()]++;
		int[][] small2 = new int[2][MAX];
		for(int i = 0 ; i < MAX ; i++) {
			small2[0][i] = prime1;
			small2[1][i] = prime2;
		}
		for(int i = 1 ; i < MAX ; i++) {
			for(int j = i ; j < MAX ; j += i) {
				if(freq[j] > 0) {
					if(j < small2[0][i]) {
						small2[0][i] = j;
					} else if(j < small2[1][i]) {
						small2[1][i] = j;
					}
					if(freq[j] > 1) {
						if(j < small2[1][i]) {
							small2[1][i] = j;
						}
					}
					if(small2[0][i] > small2[1][i]) {
						int tmp = small2[0][i];
						small2[0][i] = small2[1][i];
						small2[1][i] = tmp;
					}
				}
			}
		}
		long min = (long) 1e15;
		long A = -1, B = -1;
		for(int i = 1 ; i < MAX ; i++) {
			long lcm = lcm(small2[0][i], small2[1][i]);
			if(lcm < min) {
				min = lcm;
				A = small2[0][i];
				B = small2[1][i];
			}
		}
		int ii = -1, jj = -1;
		for(int i = 0 ; i < n ; i++) {
			if(ii == -1 && a[i] == A) {
				ii = i;
				continue;
			}
			if(jj == -1 && a[i] == B) {
				jj = i;
				continue;
			}
		}
		ii++;  jj++;
		if(ii > jj) {
			int tmp = ii;
			ii = jj;
			jj = tmp;
		}
		System.out.println(ii + " " + jj);
	}
	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		public String next() {
			while(!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch(Exception e) { e.printStackTrace(); }
			}
			return st.nextToken();
		}
		public int nextInt() { return Integer.parseInt(next()); }
	}
	public static void main(String[] args) { new CF1154G(); }
}

