Problems
Exponentiation by modulo
Exponentiation by modulo
Given integers a, b and p. Calculate the value ab
mod p.
Input
Two integers a and b (0 ≤ a, b ≤ 101000
), each in a separate line.
Output
Print ab
mod p, where modulo p = 1000000007.
Input example #1
5 3
Output example #1
125