def gcd(x,y):

    if x<y:

        x,y = y,x

    while y>0:

        x,y = y,x%y

    return x

INFTY = 10**6

P = [1 for i in range(INFTY+1)]

P[0] = 0

P[1] = 0

for i in range(2,int((INFTY+1)**0.5)+1):

    for j in range(i*i,INFTY+1,i):

        P[j] = 0

Q = []

for i in range(INFTY):

    if P[i]==1:

        Q.append(i)

A,B = list(map(int,input().split()))

x = gcd(A,B)

cnt = 1

for y in Q:

    if x%y==0:

        cnt += 1

        while x%y==0:

            x = x//y

if x>1:

    cnt += 1

print(cnt)
def gcd(x,y):

    while y>0:

        x,y = y,x%y

    return x

P = [1 for _ in range(10**6)]

P[0]=0

P[1]=0

for i in range(2,10**3):

    for j in range(i*i,10**6,i):

        P[j] = 0

Q = []

for i in range(2,10**6):

    if P[i]==1:

        Q.append(i)

A,B = list(map(int,input().split()))

N = gcd(A,B)

R = [1]

for p in Q:

    if N%p==0:

        R.append(p)

        while N%p==0:

            N = N//p

if N>1:

    R.append(N)

print((len(R)))
def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x


INFTY = 10**6
P = [1 for i in range(INFTY + 1)]
P[0] = 0
P[1] = 0
for i in range(2, int((INFTY + 1) ** 0.5) + 1):
    for j in range(i * i, INFTY + 1, i):
        P[j] = 0
Q = []
for i in range(INFTY):
    if P[i] == 1:
        Q.append(i)
A, B = list(map(int, input().split()))
x = gcd(A, B)
cnt = 1
for y in Q:
    if x % y == 0:
        cnt += 1
        while x % y == 0:
            x = x // y
if x > 1:
    cnt += 1
print(cnt)

def gcd(x, y):
    while y > 0:
        x, y = y, x % y
    return x


P = [1 for _ in range(10**6)]
P[0] = 0
P[1] = 0
for i in range(2, 10**3):
    for j in range(i * i, 10**6, i):
        P[j] = 0
Q = []
for i in range(2, 10**6):
    if P[i] == 1:
        Q.append(i)
A, B = list(map(int, input().split()))
N = gcd(A, B)
R = [1]
for p in Q:
    if N % p == 0:
        R.append(p)
        while N % p == 0:
            N = N // p
if N > 1:
    R.append(N)
print((len(R)))

-    if x < y: -        x, y = y, x -INFTY = 10**6 -P = [1 for i in range(INFTY + 1)] +P = [1 for _ in range(10**6)] -for i in range(2, int((INFTY + 1) ** 0.5) + 1): -    for j in range(i * i, INFTY + 1, i): +for i in range(2, 10**3): +    for j in range(i * i, 10**6, i): -for i in range(INFTY): +for i in range(2, 10**6): -x = gcd(A, B) -cnt = 1 -for y in Q: -    if x % y == 0: -        cnt += 1 -        while x % y == 0: -            x = x // y -if x > 1: -    cnt += 1 -print(cnt) +N = gcd(A, B) +R = [1] +for p in Q: +    if N % p == 0: +        R.append(p) +        while N % p == 0: +            N = N // p +if N > 1: +    R.append(N) +print((len(R)))