Sumdiv

Time limit: 0.02s Memory limit: 64MB Input: sumdiv.in Output: sumdiv.out

You are given two natural numbers A and B. Let S be the sum of all natural divisors of ABA^B.

Task

Find S modulo 1 000 000 007.

Input data

The first line of the input file sumdiv.in contains the two numbers A and B, separated by at least one space.

Output data

The first line of the output file sumdiv.out will contain S modulo 1 000 000 007.

Constraints

  • 1A1012 1 \le A \le 10^{12}
  • 0B1018 0 \le B \le 10^{18}

Example

sumdiv.in

2 3

sumdiv.out

15

Explanation

23=82^3 = 8.
The natural divisors of 8 are: 1, 2, 4, 8. Their sum is 15.

Log in or sign up to be able to send submissions!