a,b,n=gets.split.map &:to_i puts (a..b).to_a.repeated_permutation(n).map{|a|a.reduce{_1.gcd _2}}.reduce(1){_1*_2%(10**9+7)}