import sys import math input = sys.stdin.readline sys.setrecursionlimit(10000000) def read_values(): return map(int, input().split()) def read_index(): return map(lambda x: int(x) - 1, input().split()) def read_list(): return list(read_values()) def read_lists(N): return [read_list() for _ in range(N)] def main(): n=int(input()) c=dict() while(n > 1): find = False v = 2 while v*v<=n: if n%v==0: find=True c[v]=c.get(v,0)+1 n//=v break v+=1 if find==False: c[n]=c.get(n,0)+1 break a=list(c.values()) sa=len(a) def getind(b): res=0 for i in range(sa): res*=a[i]+1 res+=b[i] return res def revind(v): res=[0]*sa vv = v for i in range(sa-1,-1,-1): res[i]=vv%(a[i]+1) vv=vv//(a[i]+1) return res bb = getind(a)+1 dp = [0]*(bb) dp[0]=1 for b in range(bb-1): ar = revind(b) stk=[ar[0]] first = True while True: if stk[-1] > a[len(stk)-1]: stk.pop(-1) if len(stk) == 0:break stk[-1]+=1 continue if len(stk)