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.math.RoundingMode;
import java.util.*;
import java.util.Map.Entry;

	
public class Main
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private PrintWriter pw;
		private long mod = 1000000000 + 7;
		
		private StringBuilder ans_sb;
		private int sum = 0;
		private void soln()
		{
			/*int n = nextInt();
			int[] arr = nextIntArray(n);
			boolean f = true;
			for(int i=0;i<n;i++) {
				int x = arr[i];
				int y = arr[x-1];
				int z = arr[y-1]-1;
				if(i==z) {
					pw.println("YES");
					f=false;
					break;
				}
			}
			if(f)
			pw.println("NO");*/
			long n = nextLong();
			int k = nextInt();
			int i1=-1;
			long num1= -1;
			long tot = -1;
			for(int i=0;i<k;i++) {
				long x = nextLong();
				long num = n/x;
				long tot1 = num*x;
				if(tot1>tot) {
					tot = tot1;
					i1=i+1;
					num1 = num;
				}
			}
			if(i1 == -1) {
				i1=1;
				num1=0;
			}
			pw.println(i1+" "+num1);
			/*int n = nextInt();
			String s1 = nextLine();
			String s2 = nextLine();
			HashSet<Integer>[] set = new HashSet[26];
			for(int i=0;i<26;i++)
				set[i] = new HashSet<>();
			for(int i=0;i<n;i++) {
				if(s1.charAt(i) != s2.charAt(i)) {
					set[s1.charAt(i)-'a'].add(s2.charAt(i)-'a');
					set[s2.charAt(i)-'a'].add(s1.charAt(i)-'a');
				}
			}
			DSU dsu = new DSU(26);
			for(int i=0;i<26;i++) {
				for(int x:set[i]) {
					dsu.Union(x, i);
				}
			}
			int cnt = 0;
		//	debug(dsu.cnt);
			for(int i=0;i<26;i++)
				if(dsu.cnt[i] != 0)
					cnt += dsu.cnt[i] - 1;
			pw.println(cnt);
			for(int i=0;i<26;i++) {
				if(dsu.parent[i] != i) {
					pw.println((char)(i+'a')+" "+(char)(dsu.parent[i]+'a'));
				}
			}*/
		}
		class DSU
		{
			int[] parent;
			int[] cnt;

			public DSU(int n)
			{
				parent = new int[n];
				cnt = new int[n];
				for (int i = 0; i < n; i++)
				{
					parent[i] = i;
					cnt[i] = 1;
				}
				
			}

			int find(int i)
			{
				while (parent[i] != i)
				{
					parent[i] = parent[parent[i]];
					i = parent[i];
				}
				return i;
			}

			void Union(int x, int y)
			{
				int fx = find(x);
				int fy = find(y);
				if(fx != fy) {
					parent[fx] = find(fy);
					cnt[fy] += cnt[fx];
					cnt[fx] = 0;
				}
				
			}
		}

		private class Bridge{
			private LinkedList<Edge>[] graph;
			private LinkedList<Integer>[] tree;
			private int t;
			private boolean[] isBridge;
			private int[] cno;
			public Bridge(int n, int m) {
				pre(n,m);
			}
			private class Edge{
				int u, v, i;
				public Edge(int a, int b, int c) {
					u = a;
					v = b;
					i = c;
				}
			}
			private void pre(int n, int m){
				graph = new LinkedList[n];
				tree = new LinkedList[n];
				for(int i=0; i<m; i++) {
					int u = nextInt() - 1;
					int v = nextInt() - 1;
					Edge e = new Edge(u, v, i);
					graph[u].add(e);
					graph[v].add(e);
				}
				isBridge = new boolean[m];
				cno = new int[n];
				boolean[] v = new boolean[n];
				int[] arr = new int[n];
				for(int i=0; i<n; i++)
					if(!v[i])
						dfs(i, null, v, arr);
			}
			private int dfs(int u, Edge e, boolean[] v, int[] arr) {
				v[u] = true;
				arr[u] = t++;
				int min = arr[u];
				Iterator<Edge> it = graph[u].listIterator();
				while(it.hasNext()) {
					Edge x = it.next();
					int w = x.u;
					if(x.u == u)
						w = x.v;
					if(!v[w])
						min = Math.min(min, dfs(w, x, v, arr));
					else if(x != e)
						min = Math.min(min, arr[w]);
				}
				if(min == arr[u] && e != null)
					isBridge[e.i] = true;
				return min;
			}
			private void bfs(int u, int cmpNo, Queue<Integer>[] q, boolean[] v) {
				int cur = cmpNo;
				cno[cur] = cmpNo;
				q[cur].add(u);
				v[u] = true;
				while(!q[cur].isEmpty()) {
					int x = q[cur].poll();
					Iterator<Edge> it = graph[x].listIterator();
					while(it.hasNext()) {
						Edge x1 = it.next();
						int w = x1.u;
						if(w == x)
							w = x1.v;
						if(!v[w]) {
							if(isBridge[x1.i]) {
								tree[cur].add(0,cmpNo+1);
								tree[cmpNo+1].add(0, cur);
								bfs(w, cmpNo+1, q, v);
							}else {
								bfs(w, cmpNo, q, v);
							}
						}
					}
				}
			}
		}
		private class Pair implements Comparable<Pair>{
			long s,h,ans;
			public Pair(long a,long b,long c) {
				s = a;
				h = b;
				ans = c;
			}
			@Override
			public int compareTo(Pair arg0)
			{
				long mul1 = this.s * arg0.h;
				long mul2 = this.h * arg0.s;
			//	if(mul1 != mul2)
				if(mul1>mul2)
					return -1;
				else if(mul2 > mul1)
					return 1;
				return 0;
				
			//	return 0;
			}
		}
		private String solveEqn(long a, long b) {
	        long x = 0, y = 1, lastx = 1, lasty = 0, temp;
	        while (b != 0){
	        	long q = a / b;
	        	long r = a % b;
	            a = b;
	            b = r;
	            temp = x;
	            x = lastx - q * x;
	            lastx = temp;
	            temp = y;
	            y = lasty - q * y;
	            lasty = temp;
	        }
	        return lastx+" "+lasty;
		}
		private void debug(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
		
		private long pow(long a, long b, long c)
		{
			if (b == 0)
				return 1;
			long p = pow(a, b / 2, c);
			p = (p * p) % c;
			return (b % 2 == 0) ? p : (a * p) % c;
		}
	
		private long gcd(long n, long l)
		{
			if (l == 0)
				return n;
			return gcd(l, n % l);
		}
		public static void main(String[] args) throws Exception
		{
			new Thread(null, new Runnable()
			{
				@Override
				public void run()
				{
					new Main().solve();
				}
			}, "1", 1 << 25).start();
		//	new Main().solve();
		}
		public StringBuilder solve(){
			InputReader(System.in);
			/*try { 
				InputReader(new FileInputStream("C:\\Users\\hardik\\Desktop\\in.txt"));
			} catch(FileNotFoundException e) {}
			*/
			pw = new PrintWriter(System.out);
			//ans_sb = new StringBuilder();
			soln();
			
			pw.close();
			//System.out.println(ans_sb);
			return ans_sb;
		}
		public void InputReader(InputStream stream1)
		{
			stream = stream1;
		}
	
		private boolean isWhitespace(int c)
		{
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	
		private boolean isEndOfLine(int c)
		{
			return c == '\n' || c == '\r' || c == -1;
		}
	
		private 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++];
		}
	
		private 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;
		}
	
		private 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;
		}
	
		private String nextToken()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
	
		private String nextLine()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
	
		private int[] nextIntArray(int n)
		{
			int[] arr = new int[n];
			for (int i = 0; i < n; i++)
			{
				arr[i] = nextInt();
			}
			return arr;
		}
	
		private long[] nextLongArray(int n)
		{
			long[] arr = new long[n];
			for (int i = 0; i < n; i++)
			{
				arr[i] = nextLong();
			}
			return arr;
		}
	
		private void pArray(int[] arr)
		{
			for (int i = 0; i < arr.length; i++)
			{
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}
	
		private void pArray(long[] arr)
		{
			for (int i = 0; i < arr.length; i++)
			{
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}
	
		private boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}
	
		private char nextChar()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			char c1 = (char) c;
			while (!isSpaceChar(c))
				c = read();
			return c1;
		}
	
		private interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}