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 Solution {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
//        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        InputReader in = new InputReader(inputStream);
        TaskG solver = new TaskG();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskG {
        private static final long INF = 1_0000_0000_0000_0001L;
        private static final int N = 10_000_001;
        private boolean [] vis = new boolean[N];
        private int [] tag = new int[N];

        public void solve(int kase, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            Arrays.fill(vis, false);
            Arrays.fill(tag, 0);
            int first = -1;
            int second = -1;
            long res = INF;
            for (int i = 0; i < n; ++i) {
                int x = in.nextInt();
                if (vis[x] && x < res) {
                    res = x;
                    first = tag[x];
                    second = i + 1;
                }
                vis[x] = true;
                tag[x] = i + 1;
            }
//            long start = System.currentTimeMillis();
            for (int gcd = 1; gcd < N; ++gcd) {
                int gfirst = 0;
                int gsecond = 0;
                long a = 0;
                long b = 0;
                for (int g = gcd; g < N; g += gcd) {
                    if (vis[g] && gfirst == 0) {
                        a = g;
                        gfirst = tag[g];
                    }
                    else if (vis[g]) {
                        b = g;
                        gsecond = tag[g];
                        break;
                    }
                }
                long gres = INF;
                if (gfirst > 0 && gsecond > 0) {
                    gres = a * b / gcd;
                }
                if (gres < res) {
                    res = gres;
                    first = Math.min(gfirst, gsecond);
                    second = Math.max(gfirst, gsecond);
                }
            }
//            long end = System.currentTimeMillis();
//            out.println("Time: " + (end - start));
//            out.println(res);
            out.println(first + " " + second);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}
