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

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

g = math.gcd(A, B)

def prime_decompose(x):
    decomposed = []
    for i in range(2,int(pow(x,0.5))+1):
        while x % i == 0:
            x //= i
            decomposed.append(i)
    if x > 1:
        decomposed.append(x)
    return decomposed

g_dec = set(prime_decompose(g))
print(len(g_dec)+1)

Fixed submission:
import fractions

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))

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

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

g = math.gcd(A, B)

def prime_decompose(x):
    decomposed = []
    for i in range(2,int(pow(x,0.5))+1):
        while x % i == 0:
            x //= i
            decomposed.append(i)
    if x > 1:
        decomposed.append(x)
    return decomposed

g_dec = set(prime_decompose(g))
print(len(g_dec)+1)

Fixed submission:
import fractions

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))

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

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))


Fixed submission:
import fractions

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))

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

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(numpy.sqrt(g))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(numpy.sqrt(i))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))


Fixed submission:
import fractions

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))

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

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

g = math.gcd(A, B)
d = []
p = []

for i in range(1,int(math.sqrt(g))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(math.sqrt(i))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))


Fixed submission:
import fractions

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

g = fractions.gcd(A, B)
d = []
p = []

for i in range(1,int(pow(g, 0.5))+1):
    if g % i == 0:
        d.append(i)
        if i != g//i:
           d.append(g//i)

for i in d:
    s = 0
    for j in range(1,int(pow(i, 0.5))+1):
        if i % j == 0:
            s += 1

    if s == 1:
        p.append(i)

print(len(p))