n,m,k=map(int,input().split()) a=list(map(int,input().split())) M=998244353 L=10**6 c=[0]*(L+1) for v in a: c[v]+=1 p=[[] for i in range(n+1)] for i in range(1,n+1): for j in range(i,n+1,i): p[j]+=[i] e=0 for i in range(1,n+1): e+=pow((m-sum(c[j] for j in p[i]))*pow(m,M-2,M),k,M) e%=M print((n-e)%M)