#define MD 998244353 ll@N,@M,P[1d6],E[1d6],L=Factor(M,P,E);Mint a=1,t;rep(i,L)t=E[i],a*=(t+1)**N-t**N;wt(a);