from itertools import product from math import gcd Mod=10**9+7 A,B,N=map(int,input().split()) D=product(list(range(A,B+1)),repeat=N) P=1 for X in D: g=0 for a in X: g=gcd(g,a) P*=g P%=Mod print(P)