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 Main {

    final static long mod = (long)10e9+7;
    public static void main(String[] args) {
        InputReader sc = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        Random gen = new Random();
        int test = 1;//sc.nextInt();
        while(test-->0) {
            StringBuffer sb = new StringBuffer();
            long n = sc.nextLong();
            int k = sc.nextInt();
            ArrayList<Long> div = new ArrayList<>();
            for(long i=1;i*i<=n;i++)
            {
                if(n%i==0)
                {
                    div.add(i);
                    if(n/i!=i)
                        div.add(n/i);
                }
            }
            Collections.sort(div);
            if(k>div.size())
                pw.println(-1);
            else
                pw.println(div.get(k-1));

        }
        pw.close();

    }




















































































































































































    static class Data implements Comparable<Data>{
        int x;
        boolean y;

        public Data (int m, boolean n) {
            x = m;
            y = n;
        }
        @Override
        public int compareTo(Data o) {
            return x - o.x;
        }
    }
    static class Utilities {
        public static class Debug {
            public static final boolean LOCAL = System.getProperty("ONLINE_JUDGE") == null;

            private static <T> String ts(T t) {
                if (t == null) {
                    return "null";
                }
                try {
                    return ts((Iterable) t);
                } catch (ClassCastException e) {
                    if (t instanceof int[]) {
                        String s = Arrays.toString((int[]) t);
                        return "{" + s.substring(1, s.length() - 1) + "}";
                    } else if (t instanceof long[]) {
                        String s = Arrays.toString((long[]) t);
                        return "{" + s.substring(1, s.length() - 1) + "}";
                    } else if (t instanceof char[]) {
                        String s = Arrays.toString((char[]) t);
                        return "{" + s.substring(1, s.length() - 1) + "}";
                    } else if (t instanceof double[]) {
                        String s = Arrays.toString((double[]) t);
                        return "{" + s.substring(1, s.length() - 1) + "}";
                    } else if (t instanceof boolean[]) {
                        String s = Arrays.toString((boolean[]) t);
                        return "{" + s.substring(1, s.length() - 1) + "}";
                    }
                    try {
                        return ts((Object[]) t);
                    } catch (ClassCastException e1) {
                        return t.toString();
                    }
                }
            }

            private static <T> String ts(T[] arr) {
                StringBuilder ret = new StringBuilder();
                ret.append("{");
                boolean first = true;
                for (T t : arr) {
                    if (!first) {
                        ret.append(", ");
                    }
                    first = false;
                    ret.append(ts(t));
                }
                ret.append("}");
                return ret.toString();
            }

            private static <T> String ts(Iterable<T> iter) {
                StringBuilder ret = new StringBuilder();
                ret.append("{");
                boolean first = true;
                for (T t : iter) {
                    if (!first) {
                        ret.append(", ");
                    }
                    first = false;
                    ret.append(ts(t));
                }
                ret.append("}");
                return ret.toString();
            }

            public static void dbg(Object... o) {
                if (LOCAL) {
                    System.err.print("Line #" + Thread.currentThread().getStackTrace()[2].getLineNumber() + ": [");
                    for (int i = 0; i < o.length; i++) {
                        if (i != 0) {
                            System.err.print(", ");
                        }
                        System.err.print(ts(o[i]));
                    }
                    System.err.println("]");
                }
            }

        }
    }


    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int [] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public static int[] shuffle(int[] a, Random gen)
        { for(int i = 0, n = a.length;i < n;i++)
        { int ind = gen.nextInt(n-i)+i;
            int d = a[i];
            a[i] = a[ind];
            a[ind] = d;

        }
            return a;
        }


        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }

}