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;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll, ll>;
template <typename Head>
void dump_1(const char* str, Head&& h) {
  cerr << str << ": " << h << '\n';
}
template <typename Head, typename... Tail>
void dump_1(const char* str, Head&& h, Tail&&... t) {
  while (*str != ',') {
    cerr << *str++;
  }
  cerr << ": " << h << ' ';
  dump_1(str + 1, t...);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& v) {
  os << '(' << v.first << ", " << v.second << ')';
  return os;
}
template <typename T1, typename T2, typename T3>
ostream& operator<<(ostream& os, const tuple<T1, T2, T3>& v) {
  os << '(' << get<0>(v) << ", " << get<1>(v) << ", " << get<2>(v) << ')';
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (auto it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) {
      os << ' ';
    }
    os << *it;
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (auto it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) {
      os << ' ';
    }
    os << *it;
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const multiset<T>& v) {
  for (auto it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) {
      os << ' ';
    }
    os << *it;
  }
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const map<T1, T2>& v) {
  os << '{';
  for (auto it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) {
      os << ", ";
    }
    os << it->first << ':' << it->second;
  }
  os << '}';
  return os;
}
void Yes(void) { cout << "Yes" << '\n'; }
void No(void) { cout << "No" << '\n'; }
void YES(void) { cout << "YES" << '\n'; }
void NO(void) { cout << "NO" << '\n'; }
template <typename T>
void chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
  }
}
template <typename T>
void chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
  }
}
template <typename T>
void vin(vector<T>& v, ll len) {
  for (ll i = 0; i < (len); i++) {
    cin >> v[i];
  }
}
template <typename Head>
void in_1(Head& h) {
  cin >> h;
}
template <typename Head, typename... Tail>
void in_1(Head& h, Tail&... t) {
  cin >> h;
  in_1(t...);
}
template <typename Head>
void print_1(Head&& h) {
  cout << h << '\n';
}
template <typename Head, typename... Tail>
void print_1(Head&& h, Tail&&... t) {
  cout << h << ' ';
  print_1(t...);
}
const ll mod = 1000000007;
struct mint {
  ll x;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod - 2); }
  mint& operator/=(const mint a) { return (*this) *= a.inv(); }
  mint operator/(const mint a) const {
    mint res(*this);
    return res /= a;
  }
  friend ostream& operator<<(ostream& os, const mint& v) {
    os << v.x;
    return os;
  }
};
map<ll, ll> prime_factorize(ll n) {
  map<ll, ll> ret;
  for (ll i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) {
    ret[n]++;
  }
  return ret;
}
ll g(ll x, ll p) {
  auto px = prime_factorize(x);
  ll ret = 1;
  ll cnt = px[p];
  for (ll i = 0; i < (cnt); i++) {
    ret *= p;
  }
  return ret;
}
ll f(ll x, ll y) {
  ll ret = 1;
  auto px = prime_factorize(x);
  for (auto it : px) {
    ret *= g(y, it.first);
  }
  dump_1("\"f\", x, y, ret", "f", x, y, ret);
  return ret;
}
void solve() {
  ll X, N;
  in_1(X, N);
  auto px = prime_factorize(X);
  mint ans = 1;
  for (auto pa : px) {
    ll cnt = 0;
    ll n2 = N;
    while (n2 != 0) {
      n2 /= pa.first;
      cnt += n2;
    }
    mint a = pa.first;
    ans *= a.pow(cnt);
  }
  print_1(ans);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(16);
  cerr << fixed << setprecision(16);
  solve();
}
