Buggy python submission (verdict: Time Limit Exceeded):
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, i//2+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Buggy python submission (verdict: Runtime Error):
import fractions

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

i = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, i//2+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

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

i = fractions.gcd(A, B)

C = []

for j in range(2, i+1):
    while True:
        if i%j == 0:
            i //= j
            C.append(j)
        else:
            break

print(len(set(C))+1)

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Buggy python submission (verdict: Runtime Error):
import fractions

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

g = fractions.gcd(A, B)

C = []

for j in range(2, i+1):
    while True:
        if i%j == 0:
            i //= j
            C.append(j)
        else:
            break

print(len(set(C))+1)

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Buggy python submission (verdict: Runtime Error):
import fractions

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

g = fractions.gcd(A, B)

C = []

for j in range(2, i+1):
    i = g
    while True:
        if i%j == 0:
            i //= j
            C.append(j)
        else:
            break

print(len(set(C))+1)

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

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

g = fractions.gcd(A, B)

C = []
for i in range(1, g+1):
    if g%i == 0:
        for j in range(2, i+1):
            k = set()
            while True:
                if i%j == 0:
                    i //= j
                    C.append(j)
                else:
                    break

print(len(set(C))+1)

Fixed submission:
import fractions

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

x = fractions.gcd(A, B)

C = []

def cal(i):
    for j in range(2, int(-(-i**0.5//1))+1):
        while True:
            if i%j == 0:
                i //= j
                C.append(j)
            else:
                break
    if i != 1:
        C.append(i)
        
    return set(C)

print(1+len(cal(x)))