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.util.*;
import java.io.*;

public class Main{
  /*
  .
  .
  .
  .
  .
  .
  .
  some constants
  .
  */
  /*
  .
  .
  .
  if any
  .
  .
  */
  public static void main(String[] args) throws IOException{
		/*
		.
		.
		.
		.
		.
		.
		*/
    long n=nl();
    long k=nl();
    TreeSet<Long> set=new TreeSet<>();
    long i=1;
    for(i=1;(i*i)<=n;i++){
      if(n%i==0){
        set.add(i);
        set.add(n/i);
      }
    }
    i=1;
    for(long l:set){
      if(i==k){
        sop(l);
        return ;
      }
      else
        i++;
    }
    sop(-1);
    /*
		.
		.
		.
		.
		.
		.
		.
		*/
	}
	/*
	temporary functions
	.
	.
	*/
	/*
	fuctions
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	.
	abcdefghijklmnopqrstuvwxyz
	.
	.
	.
	.
	.
	.
	*/
	static int modulo(int j,int m){
		if(j<0)
			return m+j;
		  if(j>=m)
			return j-m;

			return j;
	}
	static final int mod=1000000007;
	static final double eps=1e-8;
	static final long inf=100000000000000000L;
	static final boolean debug=true;
	static Reader in=new Reader();
	static StringBuilder ansa=new StringBuilder();
	static long powm(long a,long b,long m){
		long an=1;
		long c=a;
		while(b>0){
			if(b%2==1)
				an=(an*c)%m;
			c=(c*c)%m;
			b>>=1;
		}
		return an;
	}
	static Random rn=new Random();
	static void sop(Object a){System.out.println(a);}
	static int ni(){return in.nextInt();}
	static int[] nia(int n){int a[]=new int[n];for(int i=0;i<n;i++)a[i]=ni();return a;}
	static long nl(){return in.nextLong();}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String ns(){return in.next();}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double nd(){return in.nextDouble();}
	static double[] nda(int n){double a[]=new double[n];for(int i=0;i<n;i++)a[i]=nd();return a;}
	static class Reader{
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		public Reader(){
			reader=new BufferedReader(new InputStreamReader(System.in),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());
		}
		public long nextLong(){
			return Long.parseLong(next());
		}
		public double nextDouble(){
			return Double.parseDouble(next());
		}
	}
}