#c22901. 快速幂练习

快速幂练习

Fast Exponentiation Practice

Problem Description

Given two integers aa and nn, compute an mod (109+7)a^n \bmod (10^9 + 7).

Input Format

The input consists of a single line containing two integers aa and nn.

Output Format

Output one positive integer: the answer.

Sample Input

5 10000

Sample Output

378321089

Constraints

For 100%100\% of the test cases, 1≤a,n≤1091 \le a, n \le 10^9.