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:
import collections
# import random
# import math
from collections import defaultdict
# import itertools
# from sys import stdin, stdout
#import math
import sys
# import operator
# from decimal import Decimal

# sys.setrecursionlimit(10**6)

p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def MI(): return map(int, sys.stdin.buffer.readline().split())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
def li(): return [int(i) for i in input().split()]
def lli(rows): return [li() for _ in range(rows)]
def si(): return input()
def ii(): return int(input())
def ins(): return input().split()


def solve():
    n,k = LI()
    all_factors = {1}
    p = n
    tmp={1}
    while True:
        for i in range(2,int(p**0.5)+1):
            tmp={1}
            if p%i == 0:
                for ai in all_factors:
                    tmp.add(i*ai)
                p//=i
                all_factors |= tmp
                break
        else:
            for ai in all_factors:
                tmp.add(p * ai)
            all_factors|= tmp
            break
    l = list(all_factors); l.sort()
    if k>len(l): ans = -1
    else: ans = l[k-1]



    sys.stdout.write(str(ans))
    return


def main():
    #n, q = li()
    #for _ in range(q):
    solve()
    #sys.stdout.write(str(solve()) + "\n")


    #     z += str(ans) + '\n'
    # print(len(ans), ' '.join(map(str, ans)), sep='\n')
    # stdout.write(z)


# for interactive problems
# print("? {} {}".format(l,m), flush=True)
# or print this after each print statement
# sys.stdout.flush()


if __name__ == "__main__":
    main()