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:
def primes(n):
    sieve = [True] * n
    for i in range(3, int(n ** 0.5) + 1, 2):
        if sieve[i]:
            sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
    return [2] + [i for i in range(3, n, 2) if sieve[i]]


def binomial_coefficient(n, k):
    if 0 <= k <= n:
        ntok = 1
        ktok = 1
        for t in range(1, min(k, n - k) + 1):
            ntok *= n
            ktok *= t
            n -= 1
        return ntok // ktok
    else:
        return 0


def powerOfK(k, max):
    if k == 1:
        return [1]
    if k == -1:
        return [-1, 1]

    result = []
    n = 1
    while n <= max:
        result.append(n)
        n *= k
    return result


def prefixSum(arr):
    for i in range(1, len(arr)):
        arr[i] = arr[i] + arr[i - 1]
    return arr


def divisors(n):
    i = 1
    result = []
    while i * i <= n:
        if n % i == 0:
            if n / i == i:
                result.append(i)
            else:
                result.append(i)
                result.append(n / i)
        i += 1
    return result


def kadane(a, size):
    max_so_far = 0
    max_ending_here = 0

    for i in range(0, size):
        max_ending_here = max_ending_here + a[i]
        if (max_so_far < max_ending_here):
            max_so_far = max_ending_here

        if max_ending_here < 0:
            max_ending_here = 0
    return max_so_far


# @lru_cache(maxsize=None)
def digitsSum(n):
    if n == 0:
        return 0
    r = 0
    while n > 0:
        r += n % 10
        n //= 10
    return r


def print_grid(grid):
    for line in grid:
        print("".join(line))


# n=int(input())
# n,k=map(int,input().split())
# arr=list(map(int,input().split()))
#ls=list(map(int,input().split()))
#for i in range(m):
# for _ in range(int(input())):
from collections import Counter
#from fractions import Fraction
#n = int(input())
# for _ in range(int(input())):
# import math
import sys

# from collections import deque
# from collections import Counter
# ls=list(map(int,input().split()))
# for i in range(m):
# for i in range(int(input())):
# n,k= map(int, input().split())
# arr=list(map(int,input().split()))
# n=sys.stdin.readline()
# n=int(n)
# n,k= map(int, input().split())
# arr=list(map(int,input().split()))
# n=int(input())
import math
#for _ in range(int(input())):
n,k= map(int, input().split())
ls=[]
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        if i*i!=n:
            ls+=[i]
            ls+=[n//i]
        else:
            ls+=[i]

if len(ls)<k:
    print(-1)
else:
    print(sorted(ls)[k-1])