Pondo Exponentiation


Problem Statement

Pondo has two integers xx and yy, he asks you to help him calculate xyx^y, since this number may be large, make sure to give back the answer modulo 109+710^9+7.

Input Format

Your first and only line will contain two space-separated integers xx and yy.

Output Format

Output xyx^y modulo 109+710^9 + 7.

Constraints

  • 1≤x,y≤1091 \leq x, y \leq 10^9

Sample Cases

Input 1
2 10
Output 1
1024
Input 2
1000000000
Output 2
312556845
Explanation 2

Make sure to modulo by 109+710^9 + 7.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.