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

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void checkmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T abs(T x) {
  return x < 0 ? -x : x;
}
template <class T>
inline T extgcd(T a, T b, T &x, T &y) {
  int d = a;
  if (b != 0) {
    d = extgcd(b, a % b, y, x);
    y -= (a / b) * x;
  } else {
    x = 1;
    y = 0;
  }
  return d;
}
template <class T>
inline T mypow(T n, T k) {
  T res = 1;
  for (T i = 0; i < k; ++i) res *= n;
  return res;
}
template <class T>
inline T mod_pow(T x, T n, T mod) {
  T res = 1;
  while (n) {
    if (n & 1) res = res * 1LL * x % mod;
    x = x * 1LL * x % mod;
    n >>= 1;
  }
  return res;
}
template <class T>
inline T add(int *b, int i, T x, int N) {
  while (i <= N) {
    *(b + i) += x;
    x += (x & (-x));
  }
}
template <class T>
inline T getsum(int *b, int i) {
  T res = 0;
  while (i > 0) {
    res += *(b + i);
    i -= (i & (-i));
  }
  return res;
}
template <class T>
inline void add_mod(T &a, int mod = -1) {
  if (mod == -1) mod = 1e9 + 7;
  while (a >= mod) a -= mod;
  while (a < 0) a += mod;
}
const int maxn = 1e5 + 10;
const int mod = (int)1e9 + 7;
const int inf = 2147483647;
const int sigma_size = 26;
const long long LLMAX = 0x7fffffffffffffffLL;
const long long LLMIN = 0x8000000000000000LL;
const int INF = 2147483647;
const int IMIN = 0x80000000;
const long long MOD = 1000000007LL;
const double pi = acos(-1.0);
inline int pdt(int x, int y) {
  int ret;
  __asm__ __volatile__("\tmull %%ebx\n\tdivl %%ecx\n"
                       : "=d"(ret)
                       : "a"(x), "b"(y), "c"(MOD));
  return ret;
}
long long gcd(long long a, long long b, long long *x, long long *y) {
  long long tx, ty;
  long long g;
  if (b > a) return gcd(b, a, y, x);
  if (b == 0) {
    *x = 1;
    *y = 0;
    return a;
  }
  g = gcd(b, a % b, &tx, &ty);
  *x = ty;
  *y = tx - floor(a / b) * ty;
  return g;
}
int a[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  int k;
  cin >> n >> k;
  vector<long long> div;
  div.clear();
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      div.push_back(i);
      div.push_back(n / i);
    }
  }
  sort((div).begin(), (div).end()),
      div.erase(unique((div).begin(), (div).end()), div.end());
  int sz = div.size();
  if (sz < k)
    cout << -1 << endl;
  else
    cout << div[k - 1] << endl;
  return 0;
}