Problem: You are given two integers n and k. Find k-th smallest divisor of n, or report that it doesn't exist.

Divisor of n is any such natural number, that n can be divided by it without remainder.

Input

The first line contains two integers n and k (1 ≤ n ≤ 1015, 1 ≤ k ≤ 109).

Output

If n has less than k divisors, output -1.

Otherwise, output the k-th smallest divisor of n.

Examples

Input

4 2


Output

2


Input

5 3


Output

-1


Input

12 5


Output

6

Note

In the first example, number 4 has three divisors: 1, 2 and 4. The second one is 2.

In the second example, number 5 has only two divisors: 1 and 5. The third divisor doesn't exist, so the answer is -1.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
public class CFEdu17A
{
	public static void main(String args[])
	{
		InputReader in = new InputReader(System.in);
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		/*------------------------------My Code starts here------------------------------*/
		long n=in.nextLong(),i;
		int k=in.nextInt();
		List<Long> al=new ArrayList<>();
		for(i=1 ; i*i<=n ; i++)
		{
			if(n%i==0)
			{
				al.add(i);
				if(i!=n/i)
					al.add(n/i);
			}
		}
		Collections.sort(al);
		if(k-1<al.size())
			out.println(al.get(k-1));
		else
			out.println(-1);
		out.close();
		/*------------------------------The End------------------------------------------*/
	}
	public static final long l = (int) (1e9 + 7);
	private static int[] nextIntArray(InputReader in,int n)	
	{
		int[] a=new int[n];
		for(int i=0;i<n;i++)
			a[i]=in.nextInt();
		return a;
	}
	private static void show(int[] a)
	{
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+" ");
		System.out.println();
	}
	private static void show2DArray(char[][] a)
	{
		for(int i=0;i<a.length;i++)
		{
			for(int j=0;j<a[0].length;j++)
				System.out.print(a[i][j]);
			System.out.println();
		}
	}
	static class Pair
	{
		private int first;
		private int second;
		public Pair(int i, int j) 
		{ 
			this.first = i;
			this.second = j;
		}
		public int getFirst() { return first; }
		public int getSecond() { return second ;}
		public void setFirst(int k) { this.first=k ; }
		public void setSecond(int k) { this.second=k ;}
	}
	static int modPow(int a,int b,int p)
	{
		int result=1;
		a%=p;
		while(b>0)
		{
			if((b&1)!=0)
				result=(result*a)%p;
			b=b>>1;
		a=(a*a)%p;
		}
		return result;
	}
	public static void SieveOfEratosthenes(int n)
	{
		boolean[] prime=new boolean[n+1];
		Arrays.fill(prime, true);
		prime[1]=false;
		int i,j;
		for(i=2;i*i<=n;i++)
		{
			if(prime[i])
			{
				for(j=i;j<=n;j+=i)
				{
					if(j!=i)
						prime[i]=false;
				}
			}
		}
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputstream) {
			reader = new BufferedReader(new InputStreamReader(inputstream));
			tokenizer = null;
		}

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		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 long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}