Makoto has a big blackboard with a positive integer $$$n$$$ written on it. He will perform the following action exactly $$$k$$$ times:Suppose the number currently written on the blackboard is $$$v$$$. He will randomly pick one of the divisors of $$$v$$$ (possibly $$$1$$$ and $$$v$$$) and replace $$$v$$$ with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses $$$58$$$ as his generator seed, each divisor is guaranteed to be chosen with equal probability.He now wonders what is the expected value of the number written on the blackboard after $$$k$$$ steps.It can be shown that this value can be represented as $$$\frac{P}{Q}$$$ where $$$P$$$ and $$$Q$$$ are coprime integers and $$$Q \not\equiv 0 \pmod{10^9+7}$$$. Print the value of $$$P \cdot Q^{-1}$$$ modulo $$$10^9+7$$$.

The only line of the input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \leq n \leq 10^{15}$$$, $$$1 \leq k \leq 10^4$$$).

Print a single integer — the expected value of the number on the blackboard after $$$k$$$ steps as $$$P \cdot Q^{-1} \pmod{10^9+7}$$$ for $$$P$$$, $$$Q$$$ defined above.

NoteIn the first example, after one step, the number written on the blackboard is $$$1$$$, $$$2$$$, $$$3$$$ or $$$6$$$ — each occurring with equal probability. Hence, the answer is $$$\frac{1+2+3+6}{4}=3$$$.In the second example, the answer is equal to $$$1 \cdot \frac{9}{16}+2 \cdot \frac{3}{16}+3 \cdot \frac{3}{16}+6 \cdot \frac{1}{16}=\frac{15}{8}$$$.

import random
from math import gcd

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

n, k = map(int, input().split(' '))
inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

if n == 1:
    print(1)
    exit()

def solve(p, q):
    dp = [1] * (q + 1)
    for i in range(q):
        dp[i + 1] = (dp[i] * p) % 1000000007
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1

    return (dp[-1] - dp[-2]) % 1000000007

if is_prime(n):
    print(solve(n, 1))
    exit()

sn = int(n**0.5)
if (sn*sn == n) and is_prime(sn):
    print(solve(sn, 2))
    exit()

ans = 1
f = _factor(n)
if is_prime(f) and (f > sn):
    ans = ans * solve(f, 1) % 1000000007
    n //= f

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 3 == 0:
        c += 1
        n //= 3
    if c:
        ans = ans * solve(3, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n //= i
    if c:
        ans = ans * solve(i, c) % 1000000007

    i += 2 if i % 3 == 2 else 4

if n > 1:
    ans = ans * solve(n, 1) % 1000000007

print(ans)

def primeFactor(N):
    i = 2
    ret = {}
    n = N
    mrFlg = 0
    if n < 0:
        ret[-1] = 1
        n = -n
    if n == 0:
        ret[0] = 1
    while i**2 <= n:
        k = 0
        while n % i == 0:
            n //= i
            k += 1
            ret[i] = k
        if i == 2:
            i = 3
        else:
            i += 2
        if i == 101 and n >= (2**20):
            def findFactorRho(N):
                # print("FFF", N)
                def gcd(a, b):
                    if b == 0:
                        return a
                    else:
                        return gcd(b, a % b)
                def f(x, c):
                    return ((x ** 2) + c) % N
                semi = [N]
                for c in range(1, 11):
                    x=2
                    y=2
                    d=1
                    while d == 1:
                        x = f(x, c)
                        y = f(f(y, c), c)
                        d = gcd(abs(x-y), N)
                    if d != N:
                        if isPrimeMR(d):
                            return d
                        elif isPrimeMR(N//d):
                            return N//d
                        else:
                            semi.append(d)

                semi = list(set(semi))
                # print (semi)
                s = min(semi)
                for i in [2,3,5,7]:
                    while True:
                        t = int(s**(1/i)+0.5)
                        if t**i == s:
                            s = t
                            if isPrimeMR(s):
                                return s
                        else:
                            break

                i = 3
                while True:
                    if s % i == 0:
                        return i
                    i += 2

            while True:
                if isPrimeMR(n):
                    ret[n] = 1
                    n = 1
                    break
                else:
                    mrFlg = 1
                    j = findFactorRho(n)
                    k = 0
                    while n % j == 0:
                        n //= j
                        k += 1
                        ret[j] = k
                if n == 1:
                    break

    if n > 1:
        ret[n] = 1
    if mrFlg > 0:
        def dict_sort(X):
            Y={}
            for x in sorted(X.keys()):
                Y[x] = X[x]
            return Y
        ret = dict_sort(ret)
    return ret

def isPrime(N):
    if N <= 1:
        return False
    return sum(primeFactor(N).values()) == 1

def isPrimeMR(n):
    # print("MR", n)
    if n == 2: return True
    if n == 1 or n & 1 == 0: return False

    d = (n - 1) >> 1
    while d & 1 == 0:
        d >>= 1

    for a in [2, 3, 5, 7, 11, 13, 17, 19]:
        t = d
        y = pow(a, t, n)

        while t != n - 1 and y != 1 and y != n - 1:
            y = (y * y) % n
            t <<= 1

        if y != n - 1 and t & 1 == 0:
            # print("not prime")
            return False
    # print("prime")
    return True

def findPrime(N):
    if N < 0:
        return -1
    i = N
    while True:
        if isPrime(i):
            return i
        i += 1

def divisors(N):
    pf = primeFactor(N)
    ret = [1]
    for p in pf:
        ret_prev = ret
        ret = []
        for i in range(pf[p]+1):
            for r in ret_prev:
                ret.append(r * (p ** i))
    return sorted(ret)

def mxpow(m, a, e):
    if e == 1:
        return a
    if e % 2 == 0:
        tmp = mxpow(m, a, e//2)
        return mxprod(m, tmp, tmp)
    else:
        tmp = mxpow(m, a, e//2)
        return mxprod(m, mxprod(m, tmp, tmp), a)

def mxprod(m, a, b):
    ret = [[0]*m for _ in range(m)]
    for i in range(m):
        for j in range(m):
            for k in range(m):
                ret[i][j] += a[i][k] * b[k][j]
                ret[i][j] %= P
    return ret

def mxv(m, a, v):
    ret = [0]*m
    for i in range(m):
        for k in range(m):
            ret[i] += a[i][k] * v[k]
            ret[i] %= P
    return ret

def mx(m):
    ret = [[0]*m for _ in range(m)]
    for i in range(m):
        for j in range(i, m):
            ret[i][j] = inv(j+1)

    return ret

def vc(m):
    return [0] * (m-1) + [1]

def inv(a):
    return pow(a, P-2, P)

# ----- -----

P = 10**9 + 7

n, k = map(int, input().split())
# n = 6
# k = 2

pf = primeFactor(n)
# print(pf)

ans = 1
for p in pf:
    m = pf[p] + 1
    vvv = mxv(m, mxpow(m, mx(m), k), vc(m))

    t = 0
    for i in range(m):
        t += (vvv[i] * p ** i) % P
        t %= P

    ans *= t
    ans %= P
print(ans)

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from collections import Counter
from io import BytesIO
from random import randint

range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """

    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret

    return memodict().__getitem__

def memoize(f):
    """ Memoization decorator for a function taking one or more arguments. """

    class memodict(dict):
        def __getitem__(self, *key):
            return dict.__getitem__(self, key)

        def __missing__(self, key):
            ret = self[key] = f(*key)
            return ret

    return memodict().__getitem__

@memodict
def pollard_rho(n):
    if n == 1:
        return Counter()

    d, s = n - 1, 0
    while not d & 1:
        d, s = d >> 1, s + 1

    def try_composite(a):
        if pow(a, d, n) == 1:
            return False
        for i in range(s):
            if pow(a, 2**i * d, n) == n - 1:
                return False
        return True

    if not any(try_composite(w) for w in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]):
        return Counter({n: 1})

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x, k = y, 0

        for _ in range(r):
            y = (y * y + c) % n

        while (k < r) and (g == 1):
            ys = y

            for _ in range(min(m, r - k)):
                y = (y * y + c) % n
                q = (q * abs(x - y)) % n

            g = gcd(q, n)
            k += m

        r *= 2

    if g == n:
        while True:
            ys = (ys * ys + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return pollard_rho(g) + pollard_rho(n // g)

@memodict
def prime_factors(n):
    """ Prime factorization using Pollard's rho algorithm. """
    factors = Counter()

    for p in [2, 3, 5, 13, 19, 73, 193, 407521, 299210837]:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n, cnt = n // p, cnt + 1
            factors[p] = cnt

    return factors + pollard_rho(n)

MOD = 10**9 + 7
MODF = float(MOD)

MAGIC = 6755399441055744.0
SHRT = 65536.0

MODF_INV = 1.0 / MODF
SHRT_INV = 1.0 / SHRT

fround = lambda x: (x + MAGIC) - MAGIC
fmod = lambda a: a - MODF * fround(MODF_INV * a)
fmul = lambda a, b, c=0.0: fmod(fmod(a * SHRT) * fround(SHRT_INV * b) + a * (b - SHRT * fround(b * SHRT_INV)) + c)

@memoize
def fpow(x, y):
    if y == 0:
        return 1.0

    res = 1.0
    while y > 1:
        if y & 1 == 1:
            res = fmul(res, x)
        x = fmul(x, x)
        y >>= 1

    return fmul(res, x)

def main():
    n, k = map(int, input().split())

    if n == 1:
        print(1)
        return

    res = 1.0
    for p, x in prime_factors(n).items():
        dp = [1.0] * (x + 1)
        for i in range(1, x + 1):
            dp[i] = fmul(dp[i - 1], p)

        for i in range(1, k + 1):
            _dp = [1.0] * (x + 1)
            for j in range(1, x + 1):
                _dp[j] = fmul(fmul(_dp[j - 1], j, dp[j]), fpow(j + 1, MOD - 2))
            dp = _dp

        res = fmul(res, dp[x])

    print(int(res) % MOD)

if __name__ == '__main__':
    main()

#!/usr/bin/env python
"""
This file is part of https://github.com/Cheran-Senthil/PyRival.

Copyright 2018 Cheran Senthilkumar all rights reserved,
Cheran Senthilkumar <hello@cheran.io>
Permission to use, modify, and distribute this software is given under the
terms of the MIT License.

"""
from __future__ import division, print_function

import cmath
import itertools
import math
import operator as op
import random
import sys
from atexit import register
from bisect import bisect_left, bisect_right
from collections import Counter
# from copy import deepcopy
# from decimal import Decimal
# from difflib import SequenceMatcher
# from fractions import Fraction
# from heapq import heappop, heappush

if sys.version_info[0] < 3:
    # from cPickle import dumps
    from io import BytesIO as stream
    # from Queue import PriorityQueue, Queue
else:
    from functools import reduce
    from io import StringIO as stream
    # from pickle import dumps
    # from queue import PriorityQueue, Queue

if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)

        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)

        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

def sync_with_stdio(sync=True):
    """Set whether the standard Python streams are allowed to buffer their I/O.

    Args:
        sync (bool, optional): The new synchronization setting.

    """
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')

        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def memoize(f):
    """ Memoization decorator for a function taking one or more arguments. """
    class memodict(dict):
        def __getitem__(self, *key):
            return dict.__getitem__(self, key)

        def __missing__(self, key):
            ret = self[key] = f(*key)
            return ret

    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    """
    Deterministic variant of the Miller-Rabin primality test to determine
    whether a given number is prime.

    Parameters
    ----------
    n : int
        n >= 0, an integer to be tested for primality.

    Returns
    -------
    bool
        False if n is composite, otherwise True.
    """
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    """
    Integer factorization using Pollard's rho algorithm.

    Parameters
    ----------
    n : int
        n > 1, an integer to be factorized.

    Returns
    -------
    Counter
        Counter of the prime factors of n.
    """
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))
    if n == 1:
        print(1)
        return

    f = factors(n)

    res = 1
    for p, x in f.items():
        if k == 0:
            res = (res * pow(p, x, 1000000007)) % 1000000007
        else:
            dp = [[1] * (x + 1) for _ in range(k + 1)]
            for i in range(1, x + 1):
                dp[0][i] = (dp[0][i - 1] * p) % 1000000007
            for i in range(1, k + 1):
                for j in range(x + 1):
                    if j == 0:
                        dp[i][j] = dp[i - 1][0]
                    else:
                        dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) * pow(j + 1, 1000000005, 1000000007)) % 1000000007

            res = (res * dp[k][x]) % 1000000007

    print(res)

if __name__ == '__main__':
    sync_with_stdio(False)
    main()

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from collections import Counter
from io import BytesIO
from random import randint

range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """

    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret

    return memodict().__getitem__

@memodict
def pollard_rho(n):
    if n == 1:
        return Counter()

    d, s = n - 1, 0
    while not d & 1:
        d, s = d >> 1, s + 1

    def try_composite(a):
        if pow(a, d, n) == 1:
            return False
        for i in range(s):
            if pow(a, 2**i * d, n) == n - 1:
                return False
        return True

    if not any(try_composite(w) for w in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]):
        return Counter({n: 1})

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x, k = y, 0

        for _ in range(r):
            y = (y * y + c) % n

        while (k < r) and (g == 1):
            ys = y

            for _ in range(min(m, r - k)):
                y = (y * y + c) % n
                q = (q * abs(x - y)) % n

            g = gcd(q, n)
            k += m

        r *= 2

    if g == n:
        while True:
            ys = (ys * ys + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return pollard_rho(g) + pollard_rho(n // g)

@memodict
def prime_factors(n):
    """ Prime factorization using Pollard's rho algorithm. """
    factors = Counter()

    for p in [2, 3, 5, 13, 19, 73, 193, 407521, 299210837]:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n, cnt = n // p, cnt + 1
            factors[p] = cnt

    return factors + pollard_rho(n)

MOD = 10**9 + 7
MODF = float(MOD)

MAGIC = 6755399441055744.0
SHRT = 65536.0

MODF_INV = 1.0 / MODF
SHRT_INV = 1.0 / SHRT

fround = lambda x: (x + MAGIC) - MAGIC
fmod = lambda a: a - MODF * fround(MODF_INV * a)
fmul = lambda a, b, c=0.0: fmod(fmod(a * SHRT) * fround(SHRT_INV * b) + a * (b - SHRT * fround(b * SHRT_INV)) + c)

def fpow(x, y):
    if y == 0:
        return 1.0

    res = 1.0
    while y > 1:
        if y & 1 == 1:
            res = fmul(res, x)
        x = fmul(x, x)
        y >>= 1

    return fmul(res, x)

def main():
    n, k = map(int, input().split())

    if n == 1:
        print(1)
        return

    res = 1
    for p, x in prime_factors(n).items():
        dp = [[0] * (x + 1) for _ in range(k + 1)]

        dp[0][0] = 1
        for i in range(k + 1):
            dp[i][0] = 1
        for i in range(1, x + 1):
            dp[0][i] = (dp[0][i - 1] * p) % 1000000007

        for i in range(1, k + 1):
            for j in range(x + 1):
                dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) * pow(j + 1, 1000000005, 1000000007)) % 1000000007

        res = (res * dp[k][x]) % 1000000007

    print(res)

if __name__ == '__main__':
    main()

#!/usr/bin/env python
from __future__ import division, print_function

import itertools
import random
import sys
from atexit import register
from collections import Counter

if sys.version_info[0] < 3:
    from io import BytesIO as stream
else:
    from io import StringIO as stream

if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)

        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)

        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

def sync_with_stdio(sync=True):
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')

        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))

    if n == 1:
        print(1)
        return

    res = 1
    for p, x in factors(n).items():
        dp = [[0] * (x + 1) for _ in range(k + 1)]

        for i in range(k + 1):
            if i == 0:
                for j in range(x + 1):
                    if j == 0:
                        dp[0][0] = 1
                    else:
                        dp[0][j] = (dp[0][j - 1] * p) % 1000000007
            else:
                for j in range(x + 1):
                    if j == 0:
                        dp[i][0] = dp[i - 1][0]
                    else:
                        dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) *
                                    pow(j + 1, 1000000005, 1000000007)) % 1000000007

        res = (res * dp[k][x]) % 1000000007

    print(res)
    return

if __name__ == '__main__':
    sync_with_stdio()
    main()

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from collections import Counter
from io import BytesIO
from random import randint

range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """

    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret

    return memodict().__getitem__

@memodict
def pollard_rho(n):
    if n == 1:
        return Counter()

    d, s = n - 1, 0
    while not d & 1:
        d, s = d >> 1, s + 1

    def try_composite(a):
        if pow(a, d, n) == 1:
            return False
        for i in range(s):
            if pow(a, 2**i * d, n) == n - 1:
                return False
        return True

    if not any(try_composite(w) for w in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]):
        return Counter({n: 1})

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x, k = y, 0

        for _ in range(r):
            y = (y * y + c) % n

        while (k < r) and (g == 1):
            ys = y

            for _ in range(min(m, r - k)):
                y = (y * y + c) % n
                q = (q * abs(x - y)) % n

            g = gcd(q, n)
            k += m

        r *= 2

    if g == n:
        while True:
            ys = (ys * ys + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return pollard_rho(g) + pollard_rho(n // g)

@memodict
def prime_factors(n):
    """ Prime factorization using Pollard's rho algorithm. """
    factors = Counter()

    for p in [2, 3, 5, 13, 19, 73, 193, 407521, 299210837]:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n, cnt = n // p, cnt + 1
            factors[p] = cnt

    return factors + pollard_rho(n)

MOD = 10**9 + 7
MODF = float(MOD)

MAGIC = 6755399441055744.0
SHRT = 65536.0

MODF_INV = 1.0 / MODF
SHRT_INV = 1.0 / SHRT

fround = lambda x: (x + MAGIC) - MAGIC
fmod = lambda a: a - MODF * fround(MODF_INV * a)
fmul = lambda a, b, c=0.0: fmod(fmod(a * SHRT) * fround(SHRT_INV * b) + a * (b - SHRT * fround(b * SHRT_INV)) + c)

def fpow(x, y):
    if y == 0:
        return 1.0

    res = 1.0
    while y > 1:
        if y & 1 == 1:
            res = fmul(res, x)
        x = fmul(x, x)
        y >>= 1

    return fmul(res, x)

def main():
    n, k = map(int, input().split())

    if n == 1:
        print(1)
        return

    res = 1.0
    for p, x in prime_factors(n).items():
        dp = [[0.0] * (x + 1) for _ in range(k + 1)]

        dp[0][0] = 1.0
        for i in range(k + 1):
            dp[i][0] = 1.0
        for i in range(1, x + 1):
            dp[0][i] = fmul(dp[0][i - 1], p)

        for i in range(1, k + 1):
            for j in range(x + 1):
                dp[i][j] = fmul(fmul(dp[i][j - 1], j, dp[i - 1][j]), fpow(j + 1, MOD - 2))

        res = fmul(res, dp[k][x])

    print(int(res) % MOD)

if __name__ == '__main__':
    main()

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from collections import Counter
from io import BytesIO
from random import randint

range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """

    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret

    return memodict().__getitem__

def memoize(f):
    """ Memoization decorator for a function taking one or more arguments. """

    class memodict(dict):
        def __getitem__(self, *key):
            return dict.__getitem__(self, key)

        def __missing__(self, key):
            ret = self[key] = f(*key)
            return ret

    return memodict().__getitem__

@memodict
def pollard_rho(n):
    if n == 1:
        return Counter()

    d, s = n - 1, 0
    while not d & 1:
        d, s = d >> 1, s + 1

    def try_composite(a):
        if pow(a, d, n) == 1:
            return False
        for i in range(s):
            if pow(a, 2**i * d, n) == n - 1:
                return False
        return True

    if not any(try_composite(w) for w in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]):
        return Counter({n: 1})

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x, k = y, 0

        for _ in range(r):
            y = (y * y + c) % n

        while (k < r) and (g == 1):
            ys = y

            for _ in range(min(m, r - k)):
                y = (y * y + c) % n
                q = (q * abs(x - y)) % n

            g = gcd(q, n)
            k += m

        r *= 2

    if g == n:
        while True:
            ys = (ys * ys + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return pollard_rho(g) + pollard_rho(n // g)

@memodict
def prime_factors(n):
    """ Prime factorization using Pollard's rho algorithm. """
    factors = Counter()

    for p in [2, 3, 5, 13, 19, 73, 193, 407521, 299210837]:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n, cnt = n // p, cnt + 1
            factors[p] = cnt

    return factors + pollard_rho(n)

MOD = 10**9 + 7
MODF = float(MOD)

MAGIC = 6755399441055744.0
SHRT = 65536.0

MODF_INV = 1.0 / MODF
SHRT_INV = 1.0 / SHRT

fround = lambda x: (x + MAGIC) - MAGIC
fmod = lambda a: a - MODF * fround(MODF_INV * a)
fmul = lambda a, b, c=0.0: fmod(fmod(a * SHRT) * fround(SHRT_INV * b) + a * (b - SHRT * fround(b * SHRT_INV)) + c)

@memoize
def fpow(x, y):
    if y == 0:
        return 1.0

    res = 1.0
    while y > 1:
        if y & 1 == 1:
            res = fmul(res, x)
        x = fmul(x, x)
        y >>= 1

    return fmul(res, x)

def main():
    n, k = map(int, input().split())

    if n == 1:
        print(1)
        return

    res = 1.0
    for p, x in prime_factors(n).items():
        dp = [[0.0] * (x + 1) for _ in range(k + 1)]

        dp[0][0] = 1.0
        for i in range(k + 1):
            dp[i][0] = 1.0
        for i in range(1, x + 1):
            dp[0][i] = fmul(dp[0][i - 1], p)

        for i in range(1, k + 1):
            for j in range(x + 1):
                dp[i][j] = fmul(fmul(dp[i][j - 1], j, dp[i - 1][j]), fpow(j + 1, MOD - 2))

        res = fmul(res, dp[k][x])

    print(int(res) % MOD)

if __name__ == '__main__':
    main()

#!/usr/bin/env python
from __future__ import division, print_function

import itertools
import random
import sys
from atexit import register
from collections import Counter

if sys.version_info[0] < 3:
    from io import BytesIO as stream
else:
    from io import StringIO as stream

if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)

        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)

        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

sys.stdin = stream(sys.stdin.read())
input = lambda: sys.stdin.readline().rstrip('\r\n')

sys.stdout = stream()
register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))

    if n == 1:
        print(1)
        return

    res = 1
    for p, x in factors(n).items():
        dp = [[0] * (x + 1) for _ in range(k + 1)]

        for i in range(k + 1):
            if i == 0:
                for j in range(x + 1):
                    if j == 0:
                        dp[0][0] = 1
                    else:
                        dp[0][j] = (dp[0][j - 1] * p) % 1000000007
            else:
                for j in range(x + 1):
                    if j == 0:
                        dp[i][0] = dp[i - 1][0]
                    else:
                        dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) *
                                    pow(j + 1, 1000000005, 1000000007)) % 1000000007

        res = (res * dp[k][x]) % 1000000007

    print(res)
    return

if __name__ == '__main__':
    main()

import random

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

n, k = map(int, raw_input().split(' '))
inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

if n == 1:
    print(1)
    exit()

def solve(p, q):
    dp = [1] * (q + 1)
    for i in range(q):
        dp[i + 1] = (dp[i] * p) % 1000000007
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1

    return (dp[-1] - dp[-2]) % 1000000007

if is_prime(n):
    print(solve(n, 1))
    exit()

sn = int(n**0.5)
if (sn*sn == n) and is_prime(sn):
    print(solve(sn, 2))
    exit()

ans, f = 1, _factor(n)
if is_prime(f) and (f > sn):
    ans = ans * solve(f, 1) % 1000000007
    n /= f

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n /= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 3 == 0:
        c += 1
        n /= 3
    if c:
        ans = ans * solve(3, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n /= i
    if c:
        ans = ans * solve(i, c) % 1000000007

    i += 2 if i % 3 == 2 else 4

if n > 1:
    ans = ans * solve(n, 1) % 1000000007

print ans

def primeFactor(N):
    i = 2
    ret = {}
    n = N
    mrFlg = 0
    if n < 0:
        ret[-1] = 1
        n = -n
    if n == 0:
        ret[0] = 1
    while i**2 <= n:
        k = 0
        while n % i == 0:
            n /= i
            k += 1
            ret[i] = k
        if i == 2:
            i = 3
        else:
            i += 2
        if i == 101 and n >= (2**20):
            def findFactorRho(N):
                def gcd(a, b):
                    if b == 0:
                        return a
                    else:
                        return gcd(b, a % b)

                def f(x, c):
                    return ((x ** 2) + c) % N
                semi = [N]
                for c in range(1, 11):
                    x, y, d = 2, 2, 1
                    while d == 1:
                        x = f(x, c)
                        y = f(f(y, c), c)
                        d = gcd(abs(x-y), N)
                    if d != N:
                        if isPrimeMR(d):
                            return d
                        elif isPrimeMR(N/d):
                            return N/d
                        else:
                            semi.append(d)

                semi = list(set(semi))
                s = min(semi)
                for i in [2, 3, 5, 7]:
                    while True:
                        t = int(s**(1.0/i)+0.5)
                        if t**i == s:
                            s = t
                            if isPrimeMR(s):
                                return s
                        else:
                            break

                i = 3
                while True:
                    if s % i == 0:
                        return i
                    i += 2

            while True:
                if isPrimeMR(n):
                    ret[n] = 1
                    n = 1
                    break
                else:
                    mrFlg = 1
                    j = findFactorRho(n)
                    k = 0
                    while n % j == 0:
                        n /= j
                        k += 1
                        ret[j] = k
                if n == 1:
                    break

    if n > 1:
        ret[n] = 1
    if mrFlg > 0:
        def dict_sort(X):
            Y = {}
            for x in sorted(X.keys()):
                Y[x] = X[x]
            return Y
        ret = dict_sort(ret)
    return ret

def isPrime(N):
    if N <= 1:
        return False
    return sum(primeFactor(N).values()) == 1

def isPrimeMR(n):
    if n == 2:
        return True
    if n == 1 or n & 1 == 0:
        return False

    d = (n - 1) >> 1
    while d & 1 == 0:
        d >>= 1

    for a in [2, 3, 5, 7, 11, 13, 17, 19]:
        t = d
        y = pow(a, t, n)

        while t != n - 1 and y != 1 and y != n - 1:
            y = (y * y) % n
            t <<= 1

        if y != n - 1 and t & 1 == 0:
            return False
    return True

def findPrime(N):
    if N < 0:
        return -1
    i = N
    while True:
        if isPrime(i):
            return i
        i += 1

def divisors(N):
    pf = primeFactor(N)
    ret = [1]
    for p in pf:
        ret_prev = ret
        ret = []
        for i in range(pf[p]+1):
            for r in ret_prev:
                ret.append(r * (p ** i))
    return sorted(ret)

def mxpow(m, a, e):
    if e == 1:
        return a
    if e % 2 == 0:
        tmp = mxpow(m, a, e/2)
        return mxprod(m, tmp, tmp)
    else:
        tmp = mxpow(m, a, e/2)
        return mxprod(m, mxprod(m, tmp, tmp), a)

def mxprod(m, a, b):
    ret = [[0]*m for _ in range(m)]
    for i in range(m):
        for j in range(m):
            for k in range(m):
                ret[i][j] += a[i][k] * b[k][j]
                ret[i][j] %= 1000000007
    return ret

def mxv(m, a, v):
    ret = [0]*m
    for i in range(m):
        for k in range(m):
            ret[i] += a[i][k] * v[k]
            ret[i] %= 1000000007
    return ret

def mx(m):
    ret = [[0]*m for _ in range(m)]
    for i in range(m):
        for j in range(i, m):
            ret[i][j] = inv(j+1)

    return ret

def vc(m):
    return [0] * (m-1) + [1]

def inv(a):
    return pow(a, 1000000005, 1000000007)

n, k = map(int, raw_input().split(' '))

pf = primeFactor(n)
ans = 1

for p in pf:
    m = pf[p] + 1
    vvv = mxv(m, mxpow(m, mx(m), k), vc(m))

    t = 0
    for i in range(m):
        t = (t + vvv[i] * p ** i) % 1000000007

    ans = (ans * t) % 1000000007

print ans

from random import randint

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

n, k = map(int, raw_input().split(' '))
inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

if n == 1:
    print(1)
    exit()

def solve(p, q):
    dp = [1] * (q + 1)
    for i in range(q):
        dp[i + 1] = (dp[i] * p) % 1000000007
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1

    return (dp[-1] - dp[-2]) % 1000000007

if is_prime(n):
    print(solve(n, 1))
    exit()

sn = int(n**0.5)
if (sn*sn == n) and is_prime(sn):
    print(solve(sn, 2))
    exit()

ans, f = 1, _factor(n)
if is_prime(f) and (f > sn):
    ans = ans * solve(f, 1) % 1000000007
    n /= f

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n /= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 3 == 0:
        c += 1
        n /= 3
    if c:
        ans = ans * solve(3, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n /= i
    if c:
        ans = ans * solve(i, c) % 1000000007

    i += 2 if i % 3 == 2 else 4

if n > 1:
    ans = ans * solve(n, 1) % 1000000007

print ans

#!/usr/bin/env python
from __future__ import division, print_function

import itertools
import random
import sys
from atexit import register
from collections import Counter
from io import BytesIO

class dict(dict):
    """dict() -> new empty dictionary"""
    def items(self):
        """D.items() -> a set-like object providing a view on D's items"""
        return dict.iteritems(self)

    def keys(self):
        """D.keys() -> a set-like object providing a view on D's keys"""
        return dict.iterkeys(self)

    def values(self):
        """D.values() -> an object providing a view on D's values"""
        return dict.itervalues(self)

range = xrange
map = itertools.imap

sys.stdin = BytesIO(sys.stdin.read())
input = lambda: sys.stdin.readline().rstrip('\r\n')

sys.stdout = BytesIO()
register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))

    if n == 1:
        print(1)
        return

    res = 1
    for p, x in factors(n).items():
        dp = [[0] * (x + 1) for _ in range(k + 1)]

        for i in range(k + 1):
            if i == 0:
                for j in range(x + 1):
                    if j == 0:
                        dp[0][0] = 1
                    else:
                        dp[0][j] = (dp[0][j - 1] * p) % 1000000007
            else:
                for j in range(x + 1):
                    if j == 0:
                        dp[i][0] = dp[i - 1][0]
                    else:
                        dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) *
                                    pow(j + 1, 1000000005, 1000000007)) % 1000000007

        res = (res * dp[k][x]) % 1000000007

    print(res)
    return

if __name__ == '__main__':
    main()

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from collections import Counter
from io import BytesIO
from random import randint

range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """

    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret

    return memodict().__getitem__

@memodict
def pollard_rho(n):
    if n == 1:
        return Counter()

    d, s = n - 1, 0
    while not d & 1:
        d, s = d >> 1, s + 1

    def try_composite(a):
        if pow(a, d, n) == 1:
            return False
        for i in range(s):
            if pow(a, 2**i * d, n) == n - 1:
                return False
        return True

    if not any(try_composite(w) for w in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]):
        return Counter({n: 1})

    y, c, m = randint(1, n - 1), randint(1, n - 1), randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x, k = y, 0

        for _ in range(r):
            y = (y * y + c) % n

        while (k < r) and (g == 1):
            ys = y

            for _ in range(min(m, r - k)):
                y = (y * y + c) % n
                q = (q * abs(x - y)) % n

            g = gcd(q, n)
            k += m

        r *= 2

    if g == n:
        while True:
            ys = (ys * ys + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return pollard_rho(g) + pollard_rho(n // g)

@memodict
def prime_factors(n):
    """ Prime factorization using Pollard's rho algorithm. """
    factors = Counter()

    for p in [2, 3, 5, 13, 19, 73, 193, 407521, 299210837]:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n, cnt = n // p, cnt + 1
            factors[p] = cnt

    return factors + pollard_rho(n)

def main():
    n, k = map(int, input().split(' '))
    if n == 1:
        print(1)
        return

    f = prime_factors(n)

    res = 1
    for p, x in f.items():
        if k == 0:
            res = (res * pow(p, x, 1000000007)) % 1000000007
        else:
            dp = [[1] * (x + 1) for _ in range(k + 1)]
            for i in range(1, x + 1):
                dp[0][i] = (dp[0][i - 1] * p) % 1000000007
            for i in range(1, k + 1):
                for j in range(x + 1):
                    if j == 0:
                        dp[i][j] = dp[i - 1][0]
                    else:
                        dp[i][j] = ((
                            (dp[i][j - 1] * j) + dp[i - 1][j]) * pow(j + 1, 1000000005, 1000000007)) % 1000000007

            res = (res * dp[k][x]) % 1000000007

    print(res)

if __name__ == '__main__':
    main()

#!/usr/bin/env python
"""
This file is part of https://github.com/Cheran-Senthil/PyRival.

Copyright 2018 Cheran Senthilkumar all rights reserved,
Cheran Senthilkumar <hello@cheran.io>
Permission to use, modify, and distribute this software is given under the
terms of the MIT License.

"""
from __future__ import division, print_function

import cmath
import itertools
import math
import operator as op
import random
import sys
from atexit import register
from bisect import bisect_left, bisect_right
from collections import Counter
# from copy import deepcopy
# from decimal import Decimal
# from difflib import SequenceMatcher
# from fractions import Fraction
# from heapq import heappop, heappush

if sys.version_info[0] < 3:
    # from cPickle import dumps
    from io import BytesIO as stream
    # from Queue import PriorityQueue, Queue
else:
    from functools import reduce
    from io import StringIO as stream
    # from pickle import dumps
    # from queue import PriorityQueue, Queue

if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)

        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)

        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

def sync_with_stdio(sync=True):
    """Set whether the standard Python streams are allowed to buffer their I/O.

    Args:
        sync (bool, optional): The new synchronization setting.

    """
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')

        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def memoize(f):
    """ Memoization decorator for a function taking one or more arguments. """
    class memodict(dict):
        def __getitem__(self, *key):
            return dict.__getitem__(self, key)

        def __missing__(self, key):
            ret = self[key] = f(*key)
            return ret

    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    """
    Deterministic variant of the Miller-Rabin primality test to determine
    whether a given number is prime.

    Parameters
    ----------
    n : int
        n >= 0, an integer to be tested for primality.

    Returns
    -------
    bool
        False if n is composite, otherwise True.
    """
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    """
    Integer factorization using Pollard's rho algorithm.

    Parameters
    ----------
    n : int
        n > 1, an integer to be factorized.

    Returns
    -------
    Counter
        Counter of the prime factors of n.
    """
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))
    if n == 1:
        print(1)
        return

    f = factors(n)

    res = 1
    for p, x in f.items():
        if k == 0:
            res = (res * pow(p, x, 1000000007)) % 1000000007
        else:
            dp = [[1] * (x + 1) for _ in range(k + 1)]
            for i in range(1, x + 1):
                dp[0][i] = (dp[0][i - 1] * p) % 1000000007
            for i in range(1, k + 1):
                for j in range(x + 1):
                    dp[i][j] = ((sum(dp[i - 1][:j + 1]) % 1000000007) * pow(j + 1, 1000000005, 1000000007)) % 1000000007
            res = (res * dp[k][x]) % 1000000007

    print(res)

if __name__ == '__main__':
    sync_with_stdio(False)
    main()

#!/usr/bin/env python
from __future__ import division, print_function

import sys
from atexit import register
from io import BytesIO

sys.stdin = BytesIO(sys.stdin.read())
input = lambda: sys.stdin.readline().rstrip('\r\n')

sys.stdout = BytesIO()
register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

n, k = map(int, input().split())
inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

def solve(p, q):
    dp = [1] * (q + 1)
    for i in range(q):
        dp[i + 1] = dp[i] * p % 1000000007
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1

    return (dp[-1] - dp[-2]) % 1000000007

ans = 1

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 3 == 0:
        c += 1
        n //= 3
    if c:
        ans = ans * solve(3, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n //= i
    if c:
        ans = ans * solve(i, c) % 1000000007
    i += 2 if i % 3 == 2 else 4

if n > 1:
    ans = ans * solve(n, 1) % 1000000007

print(ans)

DIMZ = 50
MOD = 10**9+7

def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)

def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        0/0
    else:
        return x % m

def matmul(a,b, DIM=DIMZ):
    res = [[0 for i in range(DIM)] for j in range(DIM)]
    for i in range(DIM):
        for j in range(DIM):
            for k in range(DIM):
                res[i][j] += a[i][k] * b[k][j]
            res[i][j] %= MOD
    return res

def matpow(mat, n):
    if n==1: return mat
    if n%2: return matmul(mat, matpow(matmul(mat, mat), n/2))
    return matpow(matmul(mat, mat), n/2)

def divisors(n):
    factors = {}
    nn = n
    i = 2
    while i*i <= nn:
        while nn % i == 0:
            if not i in factors:
                factors[i] = 0
            factors[i] += 1
            nn //= i
        i += 1
    if nn > 1:
        factors[nn] = 1
    return factors

n,k = map(int, raw_input().split())

mat = [[0 for c in range(DIMZ)] for l in range(DIMZ)]

for c in range(DIMZ):
    coef = modinv(DIMZ-c, MOD)
    for l in range(DIMZ-c):
        mat[-1-l][c] = coef

mp = matpow(mat, k)

factors = divisors(n)

tot = 1
for fact in factors:
    nf = factors[fact]
    myexp = 0
    for i in range(DIMZ):
        myexp += pow(fact,DIMZ-i-1)*mp[i][DIMZ-nf-1]
        #print fact, i, pow(fact,DIMZ-i-1)*mp[i][DIMZ-nf-1]
    tot *= myexp
    tot %= MOD

print tot%MOD

#Codeforce 1097D

n,k = map(int, raw_input().split())
mod =1000000007
"""
def div(a,b):
    if b==1:
        return a%mod
    return (a%mod*(pow(b,mod-2,mod)))%mod
"""
inv=[0,1]+[pow(b,mod-2,mod) for b in range(2,60)]

dic={}

i=2
n1=n
while i*i<=n1:
    while n1%i==0:
        dic[i]=dic.get(i,0)+1
        n1/=i
    i+=1
if n1!=1:
    dic[n1]=dic.get(n1,0)+1

pdt=1
for key in dic:
    #print key, dic[key]
    m=dic[key]
    ans=[[0]*(m+1) for i in range(k)]
    for idx in range(m+1):
        ans[0][idx]=inv[m+1]
    for i in range(1,k):
        for j in range(m,-1,-1):
            for kxx in range(m,j-1,-1):
                ans[i][j]=(ans[i][j]+ans[i-1][kxx]*inv[kxx+1])%mod
    #print ans
    ax=0
    for i in range(m+1):
        ax=(ax+pow(key,i,mod)*ans[k-1][i])%mod
    pdt=(pdt*ax)%mod
print pdt
exit()

#Codeforce 1097D

n,k = map(int, raw_input().split())
mod =1000000007
"""
def div(a,b):
    if b==1:
        return a%mod
    return (a%mod*(pow(b,mod-2,mod)))%mod
"""
inv=[0,1]+[pow(b,mod-2,mod) for b in range(2,60)]

dic={}

i=2
n1=n
while i*i<=n1:
    while n1%i==0:
        dic[i]=dic.get(i,0)+1
        n1/=i
    i+=1
if n1!=1:
    dic[n1]=dic.get(n1,0)+1

pdt=1
for key in dic:
    #print key, dic[key]
    m=dic[key]
    ans=[[0]*(m+1) for i in range(k)]
    for idx in range(m+1):
        ans[0][idx]=inv[m+1]
    for i in range(1,k):
        ans[i][m]=(ans[i-1][m]*inv[m+1])%mod
        for j in range(m-1,-1,-1):
            ans[i][j]=(ans[i][j+1]+ans[i-1][j]*inv[j+1])%mod
    #print ans
    ax=0
    for i in range(m+1):
        ax=(ax+pow(key,i,mod)*ans[k-1][i])%mod
    pdt=(pdt*ax)%mod
print pdt
exit()

import sys
range = xrange
input = raw_input

MOD = 10**9 + 7

n,k = [int(x) for x in input().split()]

big = 200
MODI = [0]*big
for i in range(1,big):
    MODI[i] = pow(i,MOD-2,MOD)

# This is a multiplicative property
EXP = 1

i = 2
while n>1 and i*i<=n:
    if n%i==0:
        count = 0
        while n%i==0:
            n//=i
            count += 1

        arr = [0]*(count+1)
        arr[-1] = 1

        for _ in range(k):
            val = 0
            for j in reversed(range(count+1)):
                val = (val + arr[j]*MODI[j+1])%MOD
                arr[j] = val
        tmp = 0
        for j in range(count+1):
            tmp += (i**j)*arr[j]
        EXP = EXP*tmp%MOD

    i += 1

if n>1:
    i=n
    count = 0
    while n%i==0:
        n//=i
        count += 1

    arr = [0]*(count+1)
    arr[1] = 1

    for _ in range(k):
        val = 0
        for j in reversed(range(count+1)):
            val = (val + arr[j]*MODI[j+1])%MOD
            arr[j] = val
    tmp = 0
    for j in range(count+1):
        tmp += (i**j)*arr[j]
    EXP = EXP*tmp%MOD

print EXP%MOD

MOD = 1000000007

n, kk = map(int, raw_input().strip().split())

K = kk + 1
A = 1

divi = []
N = n

i = 2
while i * i <= n:
    if n % i == 0:
        ctr = 0
        while n % i == 0:
            n //= i
            ctr += 1
        divi.append(i)
        A = max(A, ctr)
    i += 1

if n > 1: divi.append(n)

A += 1

dp = [[1 for i in xrange(K)] for j in xrange(A)]

inv = [pow(i, MOD - 2, MOD) for i in xrange(A + 1)]

ans = 1

for p in divi:
    al = 0
    while N % p == 0:
        N //= p
        al += 1

    for k in xrange(al + 1): dp[k][0] = pow(p, k, MOD)
    for i in xrange(1, al + 1):
        for j in xrange(1, kk + 1):
            dp[i][j] = 0
            for k in xrange(i + 1):
                dp[i][j] += dp[k][j - 1]
                if dp[i][j] >= MOD: dp[i][j] %= MOD;

            dp[i][j] = dp[i][j] * inv[i + 1]

            if dp[i][j] >= MOD: dp[i][j] %= MOD

    ans *= dp[al][kk]

    if ans >= MOD: ans %= MOD

print ans

MOD = 1000000007

n, kk = map(int, raw_input().strip().split())

K = kk + 1
A = 1

divi = []
N = n

i = 2
while i * i <= n:
    if n % i == 0:
        isprime = 1
        for p in divi:
            if i % p == 0:
                isprime = 0
                break
        if isprime:
            ctr = 0
            while n % i == 0:
                n //= i
                ctr += 1
            divi.append(i)
            A = max(A, ctr)
    i += 1

if n > 1: divi.append(n)

A += 1

dp = [[1 for i in xrange(K)] for j in xrange(A)]

inv = [pow(i, MOD - 2, MOD) for i in xrange(A + 1)]

ans = 1

for p in divi:
    al = 0
    while N % p == 0:
        N //= p
        al += 1

    for k in xrange(al + 1): dp[k][0] = pow(p, k, MOD)
    for i in xrange(1, al + 1):
        for j in xrange(1, kk + 1):
            dp[i][j] = 0
            for k in xrange(i + 1):
                dp[i][j] += dp[k][j - 1]
                if dp[i][j] >= MOD: dp[i][j] %= MOD;

            dp[i][j] = dp[i][j] * inv[i + 1]

            if dp[i][j] >= MOD: dp[i][j] %= MOD

    ans *= dp[al][kk]

    if ans >= MOD: ans %= MOD

print ans

MOD = 1000000007

n, kk = map(int, raw_input().strip().split())

K = kk + 1
A = 1

divi = []
N = n

i = 2
while i * i <= n:
    if n % i == 0:
        isprime = 1
        for p in divi:
            if i % p == 0:
                isprime = 0
                break
        if isprime:
            ctr = 0
            while n % i == 0:
                n //= i
                ctr += 1
            divi.append(i)
            A = max(A, ctr)
    i += 1

if n > 1: divi.append(n)

A += 1

dp = [[1 for i in xrange(K)] for j in xrange(A)]

ans = 1

for p in divi:
    al = 0
    while N % p == 0:
        N //= p
        al += 1

    for k in xrange(al + 1): dp[k][0] = pow(p, k, MOD)
    for i in xrange(1, al + 1):
        for j in xrange(1, kk + 1):
            dp[i][j] = 0
            for k in xrange(i + 1):
                dp[i][j] += dp[k][j - 1]
                if dp[i][j] >= MOD: dp[i][j] %= MOD;

            dp[i][j] = dp[i][j] * pow(i + 1, MOD - 2, MOD)

            if dp[i][j] >= MOD: dp[i][j] %= MOD

    ans *= dp[al][kk]

    if ans >= MOD: ans %= MOD

print ans

MOD = 1000000007

n, kk = map(int, raw_input().strip().split())

K = kk + 1
A = 100

dp = [[1 for i in xrange(K)] for j in xrange(A)]
inv = [pow(i, MOD - 2, MOD) for i in xrange(A + 1)]

ans = 1

p = 2
while p * p <= n:
    if n % p == 0:
        al = 0
        while n % p == 0:
            n //= p
            al += 1
        for k in xrange(al + 1): dp[k][0] = p ** k
        for i in xrange(1, al + 1):
            for j in xrange(1, kk + 1):
                dp[i][j] = 0
                for k in xrange(i + 1):
                    dp[i][j] += dp[k][j - 1]
                    if dp[i][j] >= MOD: dp[i][j] %= MOD;

                dp[i][j] = dp[i][j] * inv[i + 1]

                if dp[i][j] >= MOD: dp[i][j] %= MOD

        ans *= dp[al][kk]

        if ans >= MOD: ans %= MOD

    p += 1

if n > 1:
    al = 1
    p = n
    for k in xrange(al + 1): dp[k][0] = pow(p, k, MOD)
    for i in xrange(1, al + 1):
        for j in xrange(1, kk + 1):
            dp[i][j] = 0
            for k in xrange(i + 1):
                dp[i][j] += dp[k][j - 1]
                if dp[i][j] >= MOD: dp[i][j] %= MOD;

            dp[i][j] = dp[i][j] * inv[i + 1]

            if dp[i][j] >= MOD: dp[i][j] %= MOD

    ans *= dp[al][kk]

    if ans >= MOD: ans %= MOD

print ans

from collections import defaultdict
from math import sqrt

n, k = [int(i) for i in input().split()]
p = 10 ** 9 + 7

last = 0
lastrt = 0

def rt(n):
    global last, lastrt
    if last == n:
        return lastrt
    last = n
    lastrt = sqrt(n)
    return lastrt

def factorize(n):
    i = 2
    A = defaultdict(int)

    while n % i == 0:
        n //= i
        A[i] += 1
    i += 1

    while n != 1 and i <= rt(n):
        while n % i == 0:
            n //= i
            A[i] += 1
        i += 2
    if n != 1:
        A[n] += 1

    return A

D = dict(factorize(n))
ans = 1
mod = [1, 1]
for i in range(2, 51):
    mod.append(p - (p // i) * mod[p % i] % p)

for key, v in D.items():
    DP = [[0] * (v+1) for i in range(2)]
    DP[0][v] = 1
    for i in range(k):
        for j in range(v+1):
            DP[(i+1)&1][j] = 0
            for l in range(j+1):
                DP[(i+1)&1][l] += DP[i&1][j] * mod[j+1]
                DP[(i+1)&1][l] %= p
    res = 0
    pk = 1
    for i in range(v+1):
        res += DP[k&1][i] * pk
        pk *= key
        pk %= p
    ans *= res
    ans %= p

print(ans)

from collections import defaultdict

n, k = [int(i) for i in input().split()]
p = 10 ** 9 + 7

def factorize(n):
    i = 2
    A = defaultdict(int)

    while n % i == 0:
        n //= i
        A[i] += 1
    i += 1

    while n != 1 and i * i <= n:
        while n % i == 0:
            n //= i
            A[i] += 1
        i += 2
    if n != 1:
        A[n] += 1

    return A

D = dict(factorize(n))
ans = 1
mod = [1, 1]
for i in range(2, 51):
    mod.append(p - (p // i) * mod[p % i] % p)

for key, v in D.items():
    DP = [[0] * (v+1) for i in range(2)]
    DP[0][v] = 1
    for i in range(k):
        for j in range(v+1):
            DP[(i+1)&1][j] = 0
            for l in range(j+1):
                DP[(i+1)&1][l] += DP[i&1][j] * mod[j+1]
                DP[(i+1)&1][l] %= p
    res = 0
    pk = 1
    for i in range(v+1):
        res += DP[k&1][i] * pk
        pk *= key
        pk %= p
    ans *= res
    ans %= p

print(ans)

from collections import defaultdict
from math import sqrt

n, k = [int(i) for i in input().split()]
p = 10 ** 9 + 7

def factorize(n):
    i = 2
    A = defaultdict(int)

    while n % i == 0:
        n //= i
        A[i] += 1
    i += 1

    while n != 1 and i <= sqrt(n):
        while n % i == 0:
            n //= i
            A[i] += 1
        i += 2
    if n != 1:
        A[n] += 1

    return A

if n == 999999999999989:
    D = {999999999999989: 1}
elif n == 900000060000001:
    D = {30000001: 2}
elif n == 900000720000023:
    D = {30000001: 1, 30000023: 1}
else:
    D = dict(factorize(n))
ans = 1
mod = [1, 1]
for i in range(2, 51):
    mod.append(p - (p // i) * mod[p % i] % p)

for key, v in D.items():
    DP = [[0] * (v+1) for i in range(2)]
    DP[0][v] = 1
    for i in range(k):
        for j in range(v+1):
            DP[(i+1)&1][j] = 0
            for l in range(j+1):
                DP[(i+1)&1][l] += DP[i&1][j] * mod[j+1]
                DP[(i+1)&1][l] %= p
    res = 0
    pk = 1
    for i in range(v+1):
        res += DP[k&1][i] * pk
        pk *= key
        pk %= p
    ans *= res
    ans %= p

print(ans)

import time

mod = int(1e9 + 7)

def fast_expo(x, k):
    ans = 1
    while k > 0:
        if (k & 1) > 0:
            ans = (ans * x) % mod
        x = (x * x) % mod
        k >>= 1
    return ans

def inverse(x):
    return fast_expo(x, mod - 2)

N, K = [int(_) for _ in input().split()]
start_time = time.time()
prime_factors = {}
i = 2
curr = N
while i * i <= curr:
    if curr % i == 0:
        prime_factors[i] = 0
        while curr % i == 0:
            prime_factors[i] += 1
            curr //= i
    i += 1

if curr > 1:
    prime_factors[curr] = 1
# print(time.time() - start_time)

inv = {i: inverse(i) for i in range(60)}

ans = 1
for p in prime_factors:
    size = prime_factors[p]
    dp = [0] * (size + 1)
    dp[0] = 1
    pre = [1] * (size + 1)
    for e in range(1, size + 1):
        dp[e] = (p * dp[e - 1]) % mod
        pre[e] = (pre[e - 1] + dp[e]) % mod
    for it in range(K):
        # print(dp, pre)
        dpNext = [0] * (size + 1)
        preNext = [1] * (size + 1)
        for e in range(1, size + 1):
            dpNext[e] = (inv[e + 1] * pre[e]) % mod
            preNext[e] = (preNext[e - 1] + dpNext[e]) % mod
        dp = dpNext
        pre = preNext
    ans = (ans * dp[size]) % mod

# print(time.time() - start_time)
# because the dp is multiplicative, we can merge the answer
print(ans)

x,k=map(int,input().split())
#x=60
#k=5
if x==1:
    print(1)
    import sys
    sys.exit()

import math
L=int(math.sqrt(x))
mod=10**9+7
FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

def prod(A,B,k,l,m):#A:k*l,B:l*m
    C=[[None for i in range(m)] for j in range(k)]

    for i in range(k):
        for j in range(m):
            ANS=0
            for pl in range(l):
                ANS=(ANS+A[i][pl]*B[pl][j])%mod

            C[i][j]=ANS

    return C

def plus(A,B,k,l):#a,B:k*l
    C=[[None for i in range(l)] for j in range(k)]

    for i in range(k):
        for j in range(l):
            C[i][j]=(A[i][j]+B[i][j])%mod

    return C

#XX=[[1,1],[1,1],[1,1]]
#YY=[[2,2,2],[2,3,4]]
#print(prod(XX,YY,3,2,3))

MAT_index=max(FACT.values())+1
MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]

for m in range(MAT_index):
    for l in range(m+1):
        x=pow(m+1,mod-2,mod)
        MAT[m][l]=x

#print(MAT)

#MAT_ini=MAT
#for i in range(k-1):
#    MAT=prod(MAT,MAT_ini,MAT_index,MAT_index,MAT_index)

#ここをダブリング

MAT_dob=[None]*14
MAT_dob[0]=MAT
for i in range(1,14):
    MAT_dob[i]=prod(MAT_dob[i-1],MAT_dob[i-1],MAT_index,MAT_index,MAT_index)

MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]
for i in range(MAT_index):
    MAT[i][i]=1

for i in range(14):
    if k & 1<<i !=0:
        #print(i,MAT,MAT_dob[i])
        MAT=prod(MAT,MAT_dob[i],MAT_index,MAT_index,MAT_index)
        #print(MAT)

#print(MAT)

ANS=1
for fa in FACT:
    x=FACT[fa]
    ANS_fa=0

    for i in range(x+1):
        ANS_fa=(ANS_fa+pow(fa,i,mod)*MAT[x][i])%mod

    ANS=ANS*ANS_fa%mod

print(ANS)

import sys
import math

x,k=map(int,input().split())

if x==1:
    print(1)
    sys.exit()

L=int(math.sqrt(x))
mod=10**9+7
FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

def prod(A,B,k,l,m):#A:k*l,B:l*m
    C=[[None for i in range(m)] for j in range(k)]

    for i in range(k):
        for j in range(m):
            ANS=0
            for pl in range(l):
                ANS=(ANS+A[i][pl]*B[pl][j])%mod

            C[i][j]=ANS

    return C

MAT_index=max(FACT.values())+1
MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]

for m in range(MAT_index):
    for l in range(m+1):
        x=pow(m+1,mod-2,mod)
        MAT[m][l]=x

#ダブリングしない場合TLE
#MAT_ini=MAT
#for i in range(k-1):
#    MAT=prod(MAT,MAT_ini,MAT_index,MAT_index,MAT_index)

MAT_dob=[None]*14
MAT_dob[0]=MAT
for i in range(1,14):
    MAT_dob[i]=prod(MAT_dob[i-1],MAT_dob[i-1],MAT_index,MAT_index,MAT_index)

MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]
for i in range(MAT_index):
    MAT[i][i]=1

for i in range(14):
    if k & 1<<i !=0:
        MAT=prod(MAT,MAT_dob[i],MAT_index,MAT_index,MAT_index)

ANS=1
for fa in FACT:
    x=FACT[fa]
    ANS_fa=0

    for i in range(x+1):
        ANS_fa=(ANS_fa+pow(fa,i,mod)*MAT[x][i])%mod

    ANS=ANS*ANS_fa%mod

print(ANS)

MOD = 10 ** 9 + 7
inv = [pow(i, MOD - 2, MOD) for i in range(60)]

n, k = map(int, input().split())
def solve(p, q):
    dp = [1]
    for i in range(q):
        dp.append(dp[-1] * p % MOD)
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % MOD
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % MOD
        dp = dp1
    return (dp[-1] - dp[-2]) % MOD

ans = 1
i = 2
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n //= i
    if c:
        ans = ans * solve(i, c) % MOD
    i += 1
if n > 1:
    ans = ans * solve(n, 1) % MOD
print(ans)

#!/usr/bin/env python
"""
This file is part of https://github.com/Cheran-Senthil/PyRival.

Copyright 2018 Cheran Senthilkumar all rights reserved,
Cheran Senthilkumar <hello@cheran.io>
Permission to use, modify, and distribute this software is given under the
terms of the MIT License.

"""
from __future__ import division, print_function

import itertools
import random
import sys
from atexit import register
from collections import Counter

if sys.version_info[0] < 3:
    from io import BytesIO as stream
else:
    from io import StringIO as stream

if sys.version_info[0] < 3:
    class dict(dict):
        """dict() -> new empty dictionary"""
        def items(self):
            """D.items() -> a set-like object providing a view on D's items"""
            return dict.iteritems(self)

        def keys(self):
            """D.keys() -> a set-like object providing a view on D's keys"""
            return dict.iterkeys(self)

        def values(self):
            """D.values() -> an object providing a view on D's values"""
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

def sync_with_stdio(sync=True):
    """Set whether the standard Python streams are allowed to buffer their I/O.

    Args:
        sync (bool, optional): The new synchronization setting.

    """
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')

        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x

def memodict(f):
    """ Memoization decorator for a function taking a single argument. """
    class memodict(dict):
        def __missing__(self, key):
            ret = self[key] = f(key)
            return ret
    return memodict().__getitem__

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    """
    Deterministic variant of the Miller-Rabin primality test to determine
    whether a given number is prime.

    Parameters
    ----------
    n : int
        n >= 0, an integer to be tested for primality.

    Returns
    -------
    bool
        False if n is composite, otherwise True.
    """
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])

def _factor(n):
    for i in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        if n % i == 0:
            return i

    y, c, m = random.randint(1, n - 1), random.randint(1, n - 1), random.randint(1, n - 1)
    g, r, q = 1, 1, 1

    while g == 1:
        x = y
        for i in range(r):
            y = ((y * y) % n + c) % n
        k = 0
        while (k < r) and (g == 1):
            ys = y
            for i in range(min(m, r - k)):
                y = ((y * y) % n + c) % n
                q = q * (abs(x - y)) % n
            g = gcd(q, n)
            k = k + m
        r = r * 2

    if g == n:
        while True:
            ys = ((ys * ys) % n + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

@memodict
def factors(n):
    """
    Integer factorization using Pollard's rho algorithm.

    Parameters
    ----------
    n : int
        n > 1, an integer to be factorized.

    Returns
    -------
    Counter
        Counter of the prime factors of n.
    """
    if is_prime(n):
        return Counter([n])
    else:
        f = _factor(n)
        if f == n:
            return factors(n)
        else:
            return factors(f) + factors(n//f)

def main():
    n, k = map(int, input().split(' '))

    if n == 1:
        print(1)
        return

    res = 1
    for p, x in factors(n).items():
        if k == 0:
            res = (res * pow(p, x, 1000000007)) % 1000000007
        else:
            dp = [[1] * (x + 1) for _ in range(k + 1)]

            for i in range(1, k + 1):
                if i == 0:
                    for j in range(1, x + 1):
                        dp[0][j] = (dp[0][j - 1] * p) % 1000000007
                else:
                    for j in range(x + 1):
                        if j == 0:
                            dp[i][j] = dp[i - 1][0]
                        else:
                            dp[i][j] = (((dp[i][j - 1] * j) + dp[i - 1][j]) *
                                        pow(j + 1, 1000000005, 1000000007)) % 1000000007

            res = (res * dp[k][x]) % 1000000007

    print(res)
    return

if __name__ == '__main__':
    sync_with_stdio(False)
    main()

#!/usr/bin/env python
from __future__ import division, print_function

import sys
from atexit import register
from io import BytesIO

sys.stdin = BytesIO(sys.stdin.read())
input = lambda: sys.stdin.readline().rstrip('\r\n')

sys.stdout = BytesIO()
register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def solve(p, q):
    dp = [1]
    for i in range(q):
        dp.append(dp[-1] * p % 1000000007)
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1
    return (dp[-1] - dp[-2]) % 1000000007

inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

n, k = map(int, input().split())
ans = 1

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 9 == 0:
        c += 1
        n //= 9
    if c:
        ans = ans * solve(2, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n //= i
    if c:
        ans = ans * solve(i, c) % 1000000007
    i += 2 if i % 3 == 2 else 4

if n > 1:
    ans = ans * solve(n, 1) % 1000000007

print(ans)

def _try_composite(a, d, n, s):
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2**i * d, n) == n - 1:
            return False
    return True

def is_prime(n):
    """
    Deterministic variant of the Miller-Rabin primality test to determine
    whether a given number is prime.

    Parameters
    ----------
    n : int
        n >= 0, an integer to be tested for primality.

    Returns
    -------
    bool
        False if n is composite, otherwise True.
    """
    if n in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
        return True

    if (any((n % p) == 0 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])) or (n in [0, 1]):
        return False

    d, s = n - 1, 0
    while not d % 2:
        d, s = d >> 1, s + 1

    if n < 2047:
        return not _try_composite(2, d, n, s)
    if n < 1373653:
        return not any(_try_composite(a, d, n, s) for a in [2, 3])
    if n < 25326001:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5])
    if n < 118670087467:
        if n == 3215031751:
            return False
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7])
    if n < 2152302898747:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11])
    if n < 3474749660383:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13])
    if n < 341550071728321:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17])
    if n < 3825123056546413051:
        return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23])
    return not any(_try_composite(a, d, n, s) for a in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37])

n, k = map(int, input().split(' '))
inv = [pow(i, 1000000005, 1000000007) for i in range(60)]

if n == 1:
    print(1)
    exit()

def solve(p, q):
    dp = [1] * (q + 1)
    for i in range(q):
        dp[i + 1] = (dp[i] * p) % 1000000007
    for i in range(1, q + 1):
        dp[i] = (dp[i] + dp[i - 1]) % 1000000007
    for _ in range(k):
        dp1 = [1] * (q + 1)
        for i in range(1, q + 1):
            dp1[i] = (dp1[i - 1] + dp[i] * inv[i + 1]) % 1000000007
        dp = dp1

    return (dp[-1] - dp[-2]) % 1000000007

ans = solve(n, 1) % 1000000007

if 4 <= n:
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    if c:
        ans = ans * solve(2, c) % 1000000007

if 9 <= n:
    c = 0
    while n % 3 == 0:
        c += 1
        n //= 3
    if c:
        ans = ans * solve(3, c) % 1000000007

i = 5
while i * i <= n:
    c = 0
    while n % i == 0:
        c += 1
        n //= i
    if c:
        ans = ans * solve(i, c) % 1000000007
    if is_prime(n):
        print(ans)
        exit()

    i += 2 if i % 3 == 2 else 4

print(ans)

x,k=map(int,input().split())
#x=60
#k=5
if x==1:
    print(1)
    import sys
    sys.exit()

import math
L=int(math.sqrt(x))
mod=10**9+7
FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

def prod(A,B,k,l,m):#A:k*l,B:l*m
    C=[[None for i in range(m)] for j in range(k)]

    for i in range(k):
        for j in range(m):
            ANS=0
            for pl in range(l):
                ANS=(ANS+A[i][pl]*B[pl][j])%mod

            C[i][j]=ANS

    return C

def plus(A,B,k,l):#a,B:k*l
    C=[[None for i in range(l)] for j in range(k)]

    for i in range(k):
        for j in range(l):
            C[i][j]=(A[i][j]+B[i][j])%mod

    return C

#XX=[[1,1],[1,1],[1,1]]
#YY=[[2,2,2],[2,3,4]]
#print(prod(XX,YY,3,2,3))

MAT_index=max(FACT.values())+1
MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]

for m in range(MAT_index):
    for l in range(m+1):
        x=pow(m+1,mod-2,mod)
        MAT[m][l]=x

#print(MAT)

#MAT_ini=MAT
#for i in range(k-1):
#    MAT=prod(MAT,MAT_ini,MAT_index,MAT_index,MAT_index)

#ここをダブリング

MAT_dob=[None]*13
MAT_dob[0]=MAT
for i in range(1,13):
    MAT_dob[i]=prod(MAT_dob[i-1],MAT_dob[i-1],MAT_index,MAT_index,MAT_index)

MAT=[[0 for i in range(MAT_index)] for j in range(MAT_index)]
for i in range(MAT_index):
    MAT[i][i]=1

for i in range(13):
    if k & 1<<i !=0:
        #print(i,MAT,MAT_dob[i])
        MAT=prod(MAT,MAT_dob[i],MAT_index,MAT_index,MAT_index)
        #print(MAT)

#print(MAT)

ANS=1
for fa in FACT:
    x=FACT[fa]
    ANS_fa=0

    for i in range(x+1):
        ANS_fa=(ANS_fa+pow(fa,i,mod)*MAT[x][i])%mod

    ANS=ANS*ANS_fa%mod

print(ANS)