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 codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(int a, int b) {
        if (a == 0 || b == 0)
            return 1;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

    public static boolean isSubsequence(String a, String b){
        int m=a.length(),n=b.length(),i=0,j=0;
        while(i<m && j<n){
            if(a.charAt(i)==b.charAt(j)){
                i++;
            }
            j++;
        }
        return i==m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long max(long a, long b) {
        return Math.max(a, b);
    }

    public static long min(long a, long b) {
        return Math.min(a, b);
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        // int t = Integer.parseInt(br.readLine());
        ArrayList<Long> a=new ArrayList<>();
        String[] l=br.readLine().split(" ");
        long n=Long.parseLong(l[0]);
        int k=Integer.parseInt(l[1]);
        long root=(long) Math.sqrt(n);
        int c=0;
        for(long i=1;i<=root;i++){
            if(n%i==0){
                c++;
                a.add(i);
                if(c==k){
                    out.println(i);
                    break;
                }
            }
        }
        // for(int x:a)
        // out.println(x);
        l:
        if(k>c){
            boolean b=false;
            if(root*root==n)
            b=true;
            if(b && 2*c-1<k){
                out.println("-1");
                break l;
            }
            else
            if(!b && 2*c<k){
                out.println("-1");
                break l;
            }
            else 
            if(b){
                str.append(n/a.get(c-(k-c+1))).append("\n");
                out.print(str);
                break l;
            }
            else{
                str.append(n/a.get(c-(k-c))).append("\n");
                out.print(str);
                break l;            
            }            
        }
        // if(k>c)
        // out.print("-1");
        out.close();
    }
}