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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import javafx.scene.layout.GridPane;

/**
 *
 * @author ehab
 */
public class JavaApplication1 {
   static  char ar[][] ;
   static int dp[][] =new int[1004][1004] ;
   static boolean vi [][] = new boolean [1001][1001];
   static int n , m ;
   static int dr [] = {1,-1,0,0} ;
   static int dc[] = {0,0,-1,1} ;
   static Queue<pair> qu = new LinkedList<pair> () ;
   static int dfs(int x , int y )
    {  if(ar[x][y] == '*')
       {   vi[x][y] = false ; 
           return 1 ;
          
       }

       int ans = 0;
      for(int i = 0 ; i < 4 ; i++)
      {int r = x + dr[i] , c = y + dc[i] ;
       if(r >= n|| r < 0 || c >= m || c < 0 || vi[r][c] ) continue; 
       vi[r][c] = true ;
       qu.add(new pair(r ,c )) ;
       ans += dfs(r ,c) ;
       
      }


          return ans ;
    }

    public static void main(String[] args) throws Exception
    {
        Reader.init(System.in);
        StringBuilder ans = new StringBuilder();
        long n = Reader.nextLong() ;
        int r = (int)(Math.sqrt(n) );
        int size = 0;
        for(int i = 1 ; i <= r ; i++)
            if(n % i == 0)
            {
              size += 2 ;
              if(i*1l * i == n) size--; 
            }
        long ar[] = new long [size] ;
        
        int c = 0;
            for(int i = 1 ; i <= r ; i++)
            if(n % i == 0)
            { 
              if(i*1l * i == n) {ar[c] = i ; break ;}  
               
              ar[c] = i ;
              ar[size-1 - c] = n / i ;
              c++;
            }
            int k = Reader.nextInt() ;
           
            if(k > size) System.out.println(-1); 
            else 
            {
             k-- ;
                System.out.println(ar[k]);
            
            
            }
        
  
      
        
    
            
         
    
        
        
        
        
        
}
    

}
 class pair implements Comparable<pair>
    {
     int  a , b; 
   
     int ind ;
     
    pair(int a , int b)
    {
    this.a = a ;
    this.b = b ;
    
    
   
  
    }
  
    public int compareTo(pair t) {
        
     return 1 ;
    }
    
    
    
    }


class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

   
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
	 static int nextShort() throws IOException {
        return Short.parseShort(next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
    static long nextLong() throws IOException{
    return Long.parseLong(next()) ;
    }
}