For given integers m and n, compute mn (mod 1,000,000,007). Here, A (mod M) is the remainder when A is divided by M.

Constraints

* 1 ≤ m ≤ 100
* 1 ≤ n ≤ 109

Input


m n


Two integers m and n are given in a line.

Output

Print mn (mod 1,000,000,007) in a line.

Examples

Input

2 3


Output

8


Input

5 8


Output

390625
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
int vis[200005];
void init() {
  for (int i = 2; i * i <= 100000000; i++) {
    if (!vis[i]) {
      for (int j = i * 2; j * j <= 1000000000; j += i) vis[j] = 1;
    }
  }
}
int main() {
  init();
  int n;
  scanf("%d", &n);
  printf("%d:", n);
  for (int i = 2; i * i <= n; i++) {
    if (!vis[i]) {
      while (n % i == 0) {
        n /= i;
        printf(" %d", i);
      }
    }
  }
  if (n != 1) printf(" %d", n);
  puts("");
  return 0;
}
