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.lang.*;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Random;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1,in,out);
        out.close();
    }
}

class Solution {
    
    public void solve(int testNumber, InputReader in, PrintWriter out) {
		long n = in.nextLong();
		long k = in.nextLong();
		ArrayList<Long> fcts = new ArrayList<Long>();
		for(long i = 1; i<=Math.sqrt(n); i++){
		    if(n%i==0){
		        if(n/i==i){
		            fcts.add(i);
		        }
		        else{
		            fcts.add(i);
		            fcts.add(n/i);
		        }
		    }
		}
		if(k>fcts.size()){
		    out.print(-1);
		}
		else{
		    Collections.sort(fcts);
		    long val = fcts.get((int)--k);
		    out.print(val);
		}
    }
    //other stuff
    private static long lcm(long a, long b){
	    return a * b / gcd(a,b);
	}
	private static long gcd(long a, long b){
	    if(b==0){
	        return a;
	    }
	    return gcd(b, a%b);
	}
	private static void shuffle(long[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            long temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }   
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 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());
    }
    public String nextLine()
    {
        try
        {
            return reader.readLine();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return null;
    }
    public boolean hasNext()
    {
        String next=null;
        try
        {
            next=reader.readLine();
        }
        catch(Exception e)
        {
        }
        if(next==null)
        {
            return false;
        }
        tokenizer=new StringTokenizer(next);
        return true;
    }
}