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