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 math
import re
import sys
from collections import defaultdict

def read(type = int):
  return type(raw_input())
  
def read_list(type = int, split = ' ', F = None):
  if F:
    return map(lambda x: F(type(x)), raw_input().split(split))
  return map(type, raw_input().split(split))

def read_list_of_list(N, type = int, split = ' ', F = None):
  return [read_list(type, F = F) for _ in xrange(N)]
  
N = read()
A = read_list()

C = {}

X = 3163
E = [1]*X
P = []
p = 2

while p < X:
  if E[p]:
    P += [p]
    x = p
    while x<X:
      E[x] = 0
      x += p
  p += 1
  
LP = len(P)

Cm = {}
CM = {}
Im = {}
IM = {}

M = 1e30

index = 0
for a in A:
  index += 1
  if a>=M:
    continue
  b = a
  D = [1]
  p = 0
  while a and p < LP:
    while a%P[p]==0:
      D += [d*P[p] for d in D]
      a /= P[p]
    p += 1
  if a > 1:
    D += [d*a for d in D]
  for d in set(D):
    if d not in Cm:
      Cm[d] = b
      Im[d] = index
    else:
      if d not in CM:
        if b < Cm[d]:
          CM[d] = Cm[d]
          IM[d] = Im[d]
          Cm[d] = b
          Im[d] = index
        else:
          CM[d] = b
          IM[d] = index
      elif b<Cm[d]:
        CM[d] = Cm[d]
        IM[d] = Im[d]
        Cm[d] = b
        Im[d] = index
      elif b<CM[d]:
        CM[d] = b
        IM[d] = index
      else:
        continue
      if M > Cm[d]*CM[d]/d:
        x, y = Im[d], IM[d]
        M = Cm[d] * CM[d] / d 

print min(x, y), max(x,y)   