from functools import *
target=10000
d=[0]*target
n=2
while n < target:
for i in range(n*n,target,n):
d[i]=d[i]+1
n=n+1
while n < target and d[n]>0:
n=n+1
primeList=[k for k in range(2,target) if d[k]==0]
def decompose(n):
z=[]
for p in primeList:
if p*p>n:
break
k=0
while n%p==0:
n//=p
k+=1
if k:
z.append(k)
if n>1:
z.append(1)
return tuple(z)
@cache
def cal(exponents,n):
if n < 0: return 0
if n==0: return 1
if sum(exponents) < n: return 0
if len(exponents)==1: return 1
return sum(cal(tuple(exponents[1:]),n-i)for i in range(exponents[0]+1))
s=1
tick=10**6
for i in range(2,10**8+1):
exp=decompose(i)
s+=cal(exp,sum(exp)//2)
if i%tick==0:
print(i//tick,"percent completed")
print(s)