N=int(input())
mod=998244353
P=[]
F=[0]*(N+1)
for i in range(2,N):
  if F[i]:
    continue
  P.append(i)
  for j in range(i,N,i):
    F[j]=1
ANS=1
for i in range(len(P)):
  c=0
  M=N
  while M%P[i]==0:
    M//=P[i]
    c+=1
  x=1
  while N>=x*P[i]:
    x*=P[i]
    c+=1
  if x==N:
    c-=2
  ANS=ANS*pow(P[i],c,mod)%mod
print(ANS)