def Smallest_Prime_Factor(N): """0,1,2,...,Nの最小の素因数のリスト(0,1については1にしている) """ if N==0: return [1] N=abs(N) L=list(range(N+1)) L[0]=L[1]=1 x=4 while x<=N: L[x]=2 x+=2 x=9 while x<=N: if L[x]==x: L[x]=3 x+=6 x=5 Flag=True while x*x<=N: if L[x]==x: y=x*x while y<=N: if L[y]==y: L[y]=x y+=x<<1 x+=2 if Flag else 4 return L def Faster_Prime_Factorization(N,L): """ L:Smallest_Prime_Factors(N)で求めたリスト """ N=abs(N) D=[] while N>1: a=L[N] k=0 while L[N]==a: k+=1 N//=a D.append([a,k]) return D #================================================ from collections import defaultdict N=int(input()) X=Smallest_Prime_Factor(N) Mod=998244353 D=defaultdict(int) for k in range(2,N+1): S=Faster_Prime_Factorization(k,X) for p,e in S: D[p]=max(D[p],e) max_d=max(D.keys()) del D[max_d] x=1 for p in D: x*=pow(p,D[p],Mod) x%=Mod print(x)