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;
long long inv[200010], fact[200010], invfact[200010];
void PRE() {
  inv[1] = fact[0] = invfact[0] = 1;
  for (int i = 1; i < 200010; i++) {
    if (i > 1)
      inv[i] =
          (1000000007 - (1000000007 / i) * inv[1000000007 % i] % 1000000007) %
          1000000007;
    fact[i] = fact[i - 1] * i % 1000000007;
    invfact[i] = invfact[i - 1] * inv[i] % 1000000007;
  }
}
long long C(int n, int k) {
  return fact[n] * invfact[k] % 1000000007 * invfact[n - k] % 1000000007;
}
int main() {
  PRE();
  return 0;
}
