import itertools import numpy as np num, M = map(int,input().split()) count = 0 yakusuu = [] if M == 1: print(1) elif M > 1: for i in range(1, M+1): if M % i == 0: yakusuu.append(i) for sequence in itertools.combinations_with_replacement(yakusuu,num): if np.prod(sequence) <= M and np.prod(sequence)== 1: count += 1 if np.prod(sequence) >= 2 and np.prod(sequence) <= M and np.prod(sequence)// (sum(sequence)/2) == sum(sequence)/2: count += 1 elif np.prod(sequence) <= M and np.prod(sequence) // (sum(sequence)/2) != sum(sequence)/2: count += 2 print(count)