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 PYTHON3):

Solution:
from math import sqrt
from collections import defaultdict


def divisors(n):
    a = [None] * 30030
    a[0], t = 1, 1
    for i in range(2, 30030):
        if not a[i] is None:
            continue
        if t * i > 30030:
            break
        t *= i
        for j in range(i * 2, 30030, i):
            a[j] = 1
    a = [i for i in range(t) if a[i] is None]
    d = defaultdict(int)
    for i in a[1:]:
        while n % i == 0:
            n //= i
            d[i] += 1
    for j in range(1, int(sqrt(n) + 1) // t + 2):
        if t * j > n:
            break
        for ii in a:
            i = t * j + ii
            while n % i == 0:
                n //= i
                d[i] += 1
    if n > 1:
        d[n] += 1
    r = [1]
    for k, v in d.items():
        for c in r[:]:
            for i in range(1, v + 1):
                r.append(c * (k ** i))
    return sorted(r)


m, K = [int(j) for j in input().split()]
lst = sorted(divisors(m))
if len(lst) < K:
    print(-1)
else:
    print(lst[K - 1])