import sys input = sys.stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) d0 = [0 for i in range(n + 1)] for i in a: if i <= n: d0[i] += 1 d1 = [0 for i in range(n + 1)] for i in range(1, n + 1): for j in range(i, n + 1, i): d1[j] += d0[i] ans = 0 mod = 998244353 m_inv = pow(m, mod - 2, mod) for i in range(1, n + 1): ans += 1 - pow((m - d1[i]) * m_inv, k, mod) print(ans % mod)