Exponential Growth

Limits 1s, 512 MB

You will be given two integers XX and NN, you have to calculate XNX^N modulo 1000000007.

Input

The only line will have two integers XX (0X10000000 ≤ X ≤ 1000000) and NN (0N1090 ≤ N ≤ 10^9). Both XX and NN will not be zero at the same time.

Output

Please write one line, the answer of the problem.

Sample

InputOutput
1 5
1