Let's introduce some definitions that will be needed later.

Let prime(x) be the set of prime divisors of x. For example, prime(140) = \{ 2, 5, 7 \}, prime(169) = \{ 13 \}.

Let g(x, p) be the maximum possible integer p^k where k is an integer such that x is divisible by p^k. For example:

  * g(45, 3) = 9 (45 is divisible by 3^2=9 but not divisible by 3^3=27), 
  * g(63, 7) = 7 (63 is divisible by 7^1=7 but not divisible by 7^2=49). 



Let f(x, y) be the product of g(y, p) for all p in prime(x). For example:

  * f(30, 70) = g(70, 2) ⋅ g(70, 3) ⋅ g(70, 5) = 2^1 ⋅ 3^0 ⋅ 5^1 = 10, 
  * f(525, 63) = g(63, 3) ⋅ g(63, 5) ⋅ g(63, 7) = 3^2 ⋅ 5^0 ⋅ 7^1 = 63. 



You have integers x and n. Calculate f(x, 1) ⋅ f(x, 2) ⋅ … ⋅ f(x, n) mod{(10^{9} + 7)}.

Input

The only line contains integers x and n (2 ≤ x ≤ 10^{9}, 1 ≤ n ≤ 10^{18}) — the numbers used in formula.

Output

Print the answer.

Examples

Input


10 2


Output


2


Input


20190929 1605


Output


363165664


Input


947 987654321987654321


Output


593574252

Note

In the first example, f(10, 1) = g(1, 2) ⋅ g(1, 5) = 1, f(10, 2) = g(2, 2) ⋅ g(2, 5) = 2.

In the second example, actual value of formula is approximately 1.597 ⋅ 10^{171}. Make sure you print the answer modulo (10^{9} + 7).

In the third example, be careful about overflow issue.
#include <bits/stdc++.h>
using namespace std;
long long int find_mod(string s) {
  long long int i, x = 0;
  for (i = 0; i < s.length(); i++) x = (x * 10 + s[i] - '0') % 1000000007;
  return x;
}
long long int prime[10000001 + 1];
void sieve1() {
  for (int i = 0; i <= 10000001; i++) prime[i] = 1;
  prime[0] = prime[1] = 0;
  for (int p = 2; p * p <= 10000001; p++) {
    if (prime[p] == 1)
      for (int i = p * 2; i <= 10000001; i += p) {
        prime[i] = 0;
      }
  }
}
int min_prime_div_of_n[10000001 + 1];
void sieve2() {
  memset(min_prime_div_of_n, 0, sizeof(min_prime_div_of_n));
  min_prime_div_of_n[0] = min_prime_div_of_n[1] = 1;
  for (int i = 2; i * i <= 10000001; i++) {
    if (min_prime_div_of_n[i] == 0) {
      for (int j = i * 2; j < 10000001; j += i) {
        if (min_prime_div_of_n[j] == 0) {
          min_prime_div_of_n[j] = i;
        }
      }
    }
  }
  for (int i = 2; i <= 10000001; i++)
    if (min_prime_div_of_n[i] == 0) min_prime_div_of_n[i] = i;
}
int max_prime_div_of_n[10000001 + 1];
void sieve3() {
  sieve1();
  memset(max_prime_div_of_n, 0, sizeof(max_prime_div_of_n));
  max_prime_div_of_n[0] = max_prime_div_of_n[1] = 1;
  for (int i = 2; i * i <= 10000001; i++) {
    if (max_prime_div_of_n[i] == 0) {
      for (int j = i * 2; j < 10000001; j += i) {
        if (max_prime_div_of_n[j] == 0 || ((j % i) == 0 && prime[i] == 1)) {
          max_prime_div_of_n[j] = i;
        }
      }
    }
  }
  for (int i = 2; i <= 10000001; i++)
    if (max_prime_div_of_n[i] == 0) max_prime_div_of_n[i] = i;
}
long long int sum_prime_fac[1000001];
void sieve4() {
  sum_prime_fac[1000001] = {0};
  for (long long int i = 2; i <= 1000000; i++) {
    if (!sum_prime_fac[i]) {
      for (long long int j = i; j <= 1000000; j += i) sum_prime_fac[j] += i;
    }
  }
}
bool is_even(long long int n) { return (n % 2 == 0); }
bool is_odd(long long int n) { return (n % 2 == 1); }
long long int sum(long long int n) {
  long long int sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n == 5) return true;
  if ((n % 2 == 0) || (n % 3 == 0) || (n % 5 == 0)) return false;
  for (long long int i = 5; i * i <= n; i += 6)
    if ((n % i == 0) || (n % (i + 2) == 0)) return false;
  return true;
}
long long int reversenum(long long int x) {
  long long int num = 0;
  while (x > 0) {
    num = num * 10 + x % 10;
    x = x / 10;
  }
  return num;
}
bool ispalindrome(string s) {
  string q = s;
  reverse(q.begin(), q.end());
  return (s == q);
}
bool isvowel(char x) {
  return (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u');
}
long long int sumarr(long long int a[], long long int n) {
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) sum += a[i];
  return sum;
}
long long mul(long long a, long long b) {
  return ((a % 1000000007) * (b % 1000000007)) % 1000000007;
}
long long int fastexpo(long long int a, long long int b) {
  long long int ans = 1;
  while (b) {
    if (b % 2) ans = (ans * 1ll * a) % 1000000007;
    a = (a * 1ll * a) % 1000000007;
    b = b / 2;
  }
  return ans;
}
long long int findmax(long long int a[], long long int x, long long int y) {
  long long int maxi = -1;
  for (long long int i = x; i <= y; i++) {
    maxi = max(maxi, a[i]);
  }
  return maxi;
}
long long int phi[10000001];
void euler_phi() {
  for (long long int i = 0; i < 10000001 - 1; i++) phi[i + 1] = i + 1;
  for (long long int p = 2; p < 10000001; p++) {
    if (phi[p] == p) {
      phi[p] = p - 1;
      for (long long int i = 2 * p; i < 10000001; i += p)
        phi[i] = (phi[i] / p) * (p - 1);
    }
  }
}
void prime_factorise(long long int n, map<long long int, long long int> &mp) {
  while (n % 2 == 0) {
    mp[2]++;
    n /= 2;
  }
  for (long long int i = 3; i * i <= n; i += 2) {
    while (n % i == 0) {
      mp[i]++;
      n /= i;
    }
  }
  if (n > 1) mp[n]++;
}
long long int largestPower(long long int n, long long int p) {
  long long int total = 0;
  while (n) {
    n /= p;
    total += n;
  }
  return total;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int x, n;
    cin >> x >> n;
    map<long long int, long long int> mp;
    prime_factorise(x, mp);
    long long int ans = 1;
    for (auto xt : mp) {
      ans = mul(ans, fastexpo(xt.first, largestPower(n, xt.first)));
    }
    cout << ans << '\n';
  }
  return 0;
}
