a,b = map(int,input().split())
def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y)

n = gcd(a,b)
ans = 0
i = 2
while i*i <= n:
    if n%i == 0:
        while n%i == 0:
            n /= i
        ans += 1
    i += 1
if n != 1:
    ans += 1
print(ans+1) a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y) gcd if y == 0:
        return x
     y == 0 y 0 return x x return gcd(y,x%y) gcd(y,x%y) gcd y x%y x y x x y y n = gcd(a,b) n gcd(a,b) gcd a b ans = 0 ans 0 i = 2 i 2 while i*i <= n:
    if n%i == 0:
        while n%i == 0:
            n /= i
        ans += 1
    i += 1 i*i <= n i*i i i n if n%i == 0:
        while n%i == 0:
            n /= i
        ans += 1
     n%i == 0 n%i n i 0 while n%i == 0:
            n /= i
         n%i == 0 n%i n i 0 n /= i n i ans += 1 ans 1 i += 1 i 1 if n != 1:
    ans += 1 n != 1 n 1 ans += 1 ans 1 print(ans+1) print ans+1 ans 1 a,b = map(int,input().split()) map(int,input().split()) a b = map(int,input().split()) map(int,input().split()) b def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y) def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y) gcd ans += 1 1 ans ans += 1 1 ans i += 1 1 i i = 2 2 i n = gcd(a,b) gcd(a,b) n ans = 0 0 ans n /= i i n
a,b = map(int,input().split())
def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y)

n = gcd(a,b)
ans = 0
i = 2
while i*i <= n:
    if n%i == 0:
        while n%i == 0:
            n /= i
        ans += 1
    i += 1
if n != 1:
    ans += 1
print(ans+1)
