mod = 10**9 + 7 n, k, m = map(int, input().split()) ninv = pow(n, mod - 2, mod) x = pow(n, n - 1, mod) s = 0 for i in range(1, n + 1): if k % i == 0: s += x x = x * (n - i) * ninv % mod s %= mod if m == 1: print(s) else: print((pow(n, n, mod) - s) * pow(m - 1, mod - 2, mod) % mod)