from fractions import gcd
n,k=map(int,raw_input().split())
ans=1;
def rec(cur,rem,v):
global ans
if v>ans:
ans=v
if cur==0 or rem==0:
return
#choose cur
if v*(cur**rem) <= ans:
return;
if gcd(v,cur) == 1:
rec(cur-1,rem-1,v*cur)
#don't choose cur
rec(cur-1,rem,v)
def isprime(x):
i=2
while i*i<=x:
if x%i == 0:
return False;
i+=1
return True;
cur,rem=n,k;
ans=1;
while cur>1 and rem>0:
if isprime(cur):
ans*=cur;
rem-=1;
cur-=1;
rec(n,k,1);
print ans%(int(1e9+7));
ZnJvbSBmcmFjdGlvbnMgaW1wb3J0IGdjZApuLGs9bWFwKGludCxyYXdfaW5wdXQoKS5zcGxpdCgpKQphbnM9MTsKCmRlZiByZWMoY3VyLHJlbSx2KToKCWdsb2JhbCBhbnMKCWlmIHY+YW5zOgoJCWFucz12CglpZiBjdXI9PTAgb3IgcmVtPT0wOgoJCXJldHVybgoJI2Nob29zZSBjdXIKCWlmIHYqKGN1cioqcmVtKSA8PSBhbnM6CgkJcmV0dXJuOwoJaWYgZ2NkKHYsY3VyKSA9PSAxOgoJCXJlYyhjdXItMSxyZW0tMSx2KmN1cikKCSNkb24ndCBjaG9vc2UgY3VyCglyZWMoY3VyLTEscmVtLHYpCgpkZWYgaXNwcmltZSh4KToKCWk9MgoJd2hpbGUgaSppPD14OgoJCWlmIHglaSA9PSAwOgoJCQlyZXR1cm4gRmFsc2U7CgkJaSs9MQoJcmV0dXJuIFRydWU7CgpjdXIscmVtPW4sazsKYW5zPTE7CndoaWxlIGN1cj4xIGFuZCByZW0+MDoKCWlmIGlzcHJpbWUoY3VyKToKCQlhbnMqPWN1cjsKCQlyZW0tPTE7CgljdXItPTE7CgpyZWMobixrLDEpOwpwcmludCBhbnMlKGludCgxZTkrNykpOwo=