Last week, Hamed learned about a new type of equations in his math class called Modular Equations. Lets define *i* modulo *j* as the remainder of division of *i* by *j* and denote it by <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/dd2b46f89067e3a9d9987c4263de702dd7518fa7.png" style="max-width: 100.0%;max-height: 100.0%;"/>. A Modular Equation, as Hamed's teacher described, is an equation of the form <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/fc4bae676fb9b7279f0b9e6781d3d2d6abf86586.png" style="max-width: 100.0%;max-height: 100.0%;"/> in which *a* and *b* are two non-negative integers and *x* is a variable. We call a positive integer *x* for which <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/fc4bae676fb9b7279f0b9e6781d3d2d6abf86586.png" style="max-width: 100.0%;max-height: 100.0%;"/> a solution of our equation.

Hamed didn't pay much attention to the class since he was watching a movie. He only managed to understand the definitions of these equations.

Now he wants to write his math exercises but since he has no idea how to do that, he asked you for help. He has told you all he knows about Modular Equations and asked you to write a program which given two numbers *a* and *b* determines how many answers the Modular Equation <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/fc4bae676fb9b7279f0b9e6781d3d2d6abf86586.png" style="max-width: 100.0%;max-height: 100.0%;"/> has.
In the only line of the input two space-separated integers *a* and *b* (0 ≤ *a*, *b* ≤ 10<sup class="upper-index">9</sup>) are given.


# Python Program to find number of possible 
# values of X to satisfy A mod X = B  
import math 
  
# Returns the number of divisors of (A - B) 
# greater than B 
def calculateDivisors (A, B): 
    N = A - B 
    noOfDivisors = 0 
      
    a = math.sqrt(N) 
    for i in range(1, int(a + 1)): 
        # if N is divisible by i 
        if ((N % i == 0)): 
            # count only the divisors greater than B 
            if (i > B): 
                noOfDivisors +=1
                  
            # checking if a divisor isnt counted twice 
            if ((N / i) != i and (N / i) > B): 
                noOfDivisors += 1; 
                  
    return noOfDivisors 
      
# Utility function to calculate number of all 
# possible values of X for which the modular 
# equation holds true  
     
def numberOfPossibleWaysUtil (A, B): 
    # if A = B there are infinitely many solutions 
    # to equation  or we say X can take infinitely 
    # many values > A. We return -1 in this case  
    if (A == B): 
        return -1
          
    # if A < B, there are no possible values of 
    # X satisfying the equation 
    if (A < B): 
        return 0 
          
    # the last case is when A > B, here we calculate 
    # the number of divisors of (A - B), which are 
    # greater than B     
      
    noOfDivisors = 0
    noOfDivisors = calculateDivisors(A,B); 
    return noOfDivisors 
          
      
# Wrapper function for numberOfPossibleWaysUtil()  
def numberOfPossibleWays(A, B): 
    noOfSolutions = numberOfPossibleWaysUtil(A, B) 
      
    #if infinitely many solutions available 
    if (noOfSolutions == -1): 
        print ("For A = " , A , " and B = " , B 
                , ", X can take Infinitely many values"
                , " greater than "  , A) 
      
    else: 
        print ("For A = " , A , " and B = " , B 
                , ", X can take " , noOfSolutions 
                , " values") 

def main_test():

	s = input().split(" ")
	if int(s[0])+int(s[1])+int(s[2]) >= 2:
		tt +=1



T = input().split(" ")


print(numberOfPossibleWaysUtil(int(T[0]),int(T[1]) ) )
#for l in range(T):
#	main_test()

#print(tt)