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)]

def solve():
  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 = {}
  
  
  M = 1e30
  
  for a in sorted(A):
    if a >= M:
      break
    b = a
    D = set([1])
    p = 0
    while a and p < LP:
      while a%P[p]==0:
        D.update(set(d*P[p] for d in D))
        a /= P[p]
      p += 1
    if a > 1:
      D.update(set(d*a for d in D))
    for d in D:
      if d not in Cm:
        Cm[d] = b
      elif d not in CM:
        CM[d] = b
        if M > Cm[d]*CM[d]/d:
          x, y = Cm[d], CM[d]
          M = Cm[d] * CM[d] / d 
  
  l1 = A.index(x)
  if x==y:
    l2 = l1 + 1 + A[l1+1:].index(y)
  else:
    l2 = A.index(y)
  
  l1 += 1
  l2 += 1
    
  if l1<l2:
    print l1,l2
  else:
    print l2,l1

solve()   