Dima has a hamsters farm. Soon N hamsters will grow up on it and Dima will sell them in a city nearby.

Hamsters should be transported in boxes. If some box is not completely full, the hamsters in it are bored, that's why each box should be completely full with hamsters.

Dima can buy boxes at a factory. The factory produces boxes of K kinds, boxes of the i-th kind can contain in themselves ai hamsters. Dima can buy any amount of boxes, but he should buy boxes of only one kind to get a wholesale discount.

Of course, Dima would buy boxes in such a way that each box can be completely filled with hamsters and transported to the city. If there is no place for some hamsters, Dima will leave them on the farm.

Find out how many boxes and of which type should Dima buy to transport maximum number of hamsters.

Input

The first line contains two integers N and K (0 ≤ N ≤ 1018, 1 ≤ K ≤ 105) — the number of hamsters that will grow up on Dima's farm and the number of types of boxes that the factory produces.

The second line contains K integers a1, a2, ..., aK (1 ≤ ai ≤ 1018 for all i) — the capacities of boxes.

Output

Output two integers: the type of boxes that Dima should buy and the number of boxes of that type Dima should buy. Types of boxes are numbered from 1 to K in the order they are given in input.

If there are many correct answers, output any of them.

Examples

Input

19 3
5 4 10


Output

2 4


Input

28 3
5 6 30


Output

1 5
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static InputReader in;
    static PrintWriter out;
    static long time_start;
    static int cas = 0;
    static double eps = 1e-8;
    static int mod = (int) 1e9 + 9;
    static int inf = 0x3f3f3f3f;
    static long inff = 0x3f3f3f3f3f3f3f3fL;
    static int maxn = (int) 5000 + 5;
    static int[] a = new int[maxn];


    static void solve() {
        while (in.hasNext()) {
            long n = in.nextLong();
            int k = in.nextInt();
            int ii = 1;
            long cnt = 1;
            long rs = 1L << 60;
            for (int i = 1; i <= k; ++i) {
                long a = in.nextLong();
                if (n % a < rs) {
                    rs = n % a;
                    cnt = n / a;
                    ii = i;
                }
            }
            out.println(ii + " " + cnt);
        }
    }

    static long pow(long x, long n, long m) {
        long res = 1;
        while (n > 0) {
            if ((n & 1) == 1) res = res * x % m;
            x = x * x % m;
            n >>= 1;
        }
        return res;
    }



    static void swap(int[] arr, int i, int j) {
        if (arr[i] != arr[j]) {
            arr[i] ^= arr[j];
            arr[j] ^= arr[i];
            arr[i] ^= arr[j];
        }
    }

    static void reverse(int[] arr, int i, int j) {
        while (i < j) {
            swap(arr, i++, j--);
        }
    }

    public static void main(String[] args) {
        openIO();
        solve();
        closeIO();
    }

    static void openIO() {
        try {
            time_start = 0;
            FileInputStream fi = new FileInputStream("night_input");
            System.setIn(fi);
            time_start = System.currentTimeMillis();
        } catch (Exception ex) {
            //hello night_13
        }

        in = new InputReader(System.in);
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }

    static void closeIO() {
        out.flush();

        if (time_start != 0) {
            out.println();
            out.print("time cost: ");
            out.print(System.currentTimeMillis() - time_start);
            out.println(" ms");
        }
        in.close();
        out.close();
    }
}


class InputReader {
    private BufferedReader br;
    private StringTokenizer st;

    public InputReader(InputStream stream) {
        br = new BufferedReader(new InputStreamReader(stream));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null) return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }

    public BigDecimal nextBigDecimal() {
        return new BigDecimal(next());
    }

    public int[] nextIntArray(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n) {
        double[] arr = new double[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray() {
        return next().toCharArray();
    }

    public int[] nextIntArray(int n, int st) {
        n += st;
        int[] arr = new int[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n, int st) {
        n += st;
        double[] arr = new double[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray(int st) {
        String temp = "";
        while (st-- > 0) temp += " ";
        return (temp + next()).toCharArray();
    }

    public void close() {
        try {
            br.close();
        } catch (IOException e) {
        }
    }
}