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=[0]*(n+1) for i in range(1,n+1): for j in range(i,n+1,i): p[j]+=c[i] e=0 im=pow(m,M-2,M) for i in range(1,n+1): e+=pow((m-p[i])*im,k,M) e%=M print((n-e)%M)