from collections import Counter N,M,K=map(int,input().split()) A=list(map(int,input().split())) mod=998244353 C=Counter(A) LIST=[0]*(N+1) for c in C: for i in range(c,N+1,c): LIST[i]+=C[c] ANS=0 INV=pow(M,mod-2,mod) for i in range(1,N+1): x=LIST[i] ANS+=pow((M-x)*INV,K,mod) ANS%=mod print((N-ANS)%mod)