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;
long long dx[] = {-1, 0, 1, 0};
long long dy[] = {0, 1, 0, -1};
long long spf[10];
long long dist[1001];
void sieve() {
  long long i, j;
  for (i = 0; i < 10; i++) spf[i] = i;
  for (i = 4; i < 10; i += 2) spf[i] = 2;
  for (i = 3; i * i < 10; i++) {
    if (spf[i] == i) {
      for (j = i * i; j < 10; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
}
bool isvowel(char c) {
  switch (c) {
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u':
    case 'y':
      return true;
    default:
      return false;
  }
}
bool cmp(pair<long long, long long> x, pair<long long, long long> y) {
  return x.first > y.first;
}
long long isPrime(long long n) {
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return i;
    }
  }
  return n;
}
long long sum(long long n) {
  long long ans = 0;
  while (n > 0) {
    long long d = n % 10;
    ans += d;
    n /= 10;
  }
  return ans;
}
vector<long long> adj[5001];
vector<long long> adj1[5001];
long long sub[1001];
long long dist1[1001];
long long vis1[1001];
long long cnt;
struct x {
  long long b;
  long long c;
  long long d;
};
long long vis[21][21];
long long n, m;
string a, b;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    set<long long> s;
    for (long long i = 1; i <= sqrt(n); i++) {
      if (n % i == 0) {
        s.insert(n / i);
        s.insert(i);
      }
    }
    long long n1 = s.size();
    if (n1 < k) {
      cout << "-1"
           << "\n";
      return 0;
    }
    vector<long long> v;
    for (auto j : s) {
      v.push_back(j);
    }
    cout << v[k - 1] << "\n";
  }
  return 0;
}