Ước thứ k của n

View as PDF

Submit solution

Points: 0.01
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Authors:
Problem type

Cho 2 số nguyên n, k (Với 1≤n,k≤100000000). Tính ước thứ k của số n. Nếu không tồn tại xuất ra −1.

Input

Dòng đầu tiên chứa 2 số nguyên n, k (Với 1≤n,k≤100000000).

Output

Một dòng duy nhất chứa ước thứ k của số n. Hoặc chứa −1 nếu không tồn tại ước thứ k của số n.

Examples

Input

1 1

Output

1

Input

27 2

Output

3

Input

285 2580

Output

-1

Comments

Please read the guidelines before commenting.


There are no comments at the moment.