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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.Collection;
import java.io.IOException;
import java.io.Reader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import java.util.StringTokenizer;
import java.io.Writer;
import java.util.Optional;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.util.NoSuchElementException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Ruins He
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long n = in.nextLong();
            int k = in.nextInt();

            if (n == 1) {
                out.println(k > 1 ? -1 : 1);
                return;
            }

            List<Long> factors = new ArrayList<>();
            for (long i = 1; i * i <= n; i++) {
                if (n % i == 0) {
                    factors.add(i);
                    if (n / i != i) {
                        factors.add(n / i);
                    }
                }
            }

            out.println(factors.size() < k ? -1 : factors.stream().sorted().skip(k - 1).limit(1).findAny().orElse(-1L));
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        private OutputWriter(Writer writer, boolean autoFlush) {
            this.writer = new PrintWriter(new BufferedWriter(writer, 32767), autoFlush);
        }

        public OutputWriter(Writer writer) {
            this(writer, true);
        }

        public OutputWriter(OutputStream outputStream) {
            this(new OutputStreamWriter(outputStream), false);
        }

        public OutputWriter println(int value) {
            writer.println(value);
            return this;
        }

        public OutputWriter println(Object object) {
            writer.println(object);
            return this;
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer = null;

        public InputReader(Reader reader) {
            this.reader = new BufferedReader(reader, 32767);
        }

        public InputReader(InputStream inputStream) {
            this(new InputStreamReader(inputStream));
        }

        public String next() {
            if (hasNext()) return tokenizer.nextToken();
            else throw new NoSuchElementException();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public boolean hasNext() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    String nextLine = reader.readLine();
                    if (nextLine == null) return false;
                    tokenizer = new StringTokenizer(nextLine);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.hasMoreTokens();
        }

    }
}