Buggy python submission (verdict: Runtime Error):
import math
from fractions import gcd
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return set(divisors)

def primes(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, n + 1):
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return set([i for i in range(n + 1) if is_prime[i]])

A, B = map(int, input().split())
g = gcd(A, B)
if g==1:
    print(1)
else:
    nums = make_divisors(g)
    pn = primes(g)
    ans = set.intersection(nums, pn)
    print(len(ans)+1)

Fixed submission:
def gcd(a, b):
    return gcd(b, a%b) if b!=0 else a

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def isprime(n):
    sup = int(n**0.5)
    for i in range(2, sup+1):
        if n%i==0:
            return False
    return True

A, B = map(int, input().split())
g = gcd(A, B)
divs = make_divisors(g)
ans = 0
for d in divs:
    ans += 1 if isprime(d) else 0
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
from fractions import gcd
def get_primenumber(number):
    prime_list = []
    search_list = list(range(2,number+1))
    while True:
        if search_list[0] > math.sqrt(number):
            prime_list.extend(search_list)
            break
        else:
            head_num = search_list[0]
            prime_list.append(head_num)
            search_list.pop(0)
            search_list = [num for num in search_list if num % head_num != 0]
    return prime_list

A, B = map(int, input().split())
g = gcd(A, B)
if g==1:
    print(1)
else:
    pn = get_primenumber(int(math.sqrt(g)))
    print(len(pn))

Fixed submission:
def gcd(a, b):
    return gcd(b, a%b) if b!=0 else a

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def isprime(n):
    sup = int(n**0.5)
    for i in range(2, sup+1):
        if n%i==0:
            return False
    return True

A, B = map(int, input().split())
g = gcd(A, B)
divs = make_divisors(g)
ans = 0
for d in divs:
    ans += 1 if isprime(d) else 0
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
g = gcd(A, B)
pn = [2]
for L in range(3, g):
    chk=True
    for L2 in pn:
        if L%L2==0:chk=False
    if chk==True and gcd(g,L)!=1:pn.append(L)
print(len(pn)+1)

Fixed submission:
def gcd(a, b):
    return gcd(b, a%b) if b!=0 else a

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def isprime(n):
    sup = int(n**0.5)
    for i in range(2, sup+1):
        if n%i==0:
            return False
    return True

A, B = map(int, input().split())
g = gcd(A, B)
divs = make_divisors(g)
ans = 0
for d in divs:
    ans += 1 if isprime(d) else 0
print(ans)