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

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

for i in range(3, int(f)+1, 2):
    # print(f, i)
    if f % i != 0:
        continue
    else:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    if f == 1:
        break
print(len(kouyakusuu)+1)

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

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

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

f = fractions.gcd(A, B)

kouyakusuu = []
# print(f)
for i in range(2, f+1):
    # print(f, i)
    if f % i != 0:
        continue
    else:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    if f == 1:
        break
# print(kouyakusuu)
print(len(kouyakusuu)+1)

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

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

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

f = fractions.gcd(A, B)

kouyakusuu = []
for i in range(2, f+1):
    if f % i != 0:
        continue
    else:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
print(len(kouyakusuu)+1)

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

Buggy python submission (verdict: Runtime Error):
from math import gcd as bltin_gcd
import itertools

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A, B = map(int, input().split())
koyakusuu_list = []

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)

    # divisors.sort()
    return divisors

for a in make_divisors(A):
    if a == 1:
        koyakusuu_list.append(1)
    elif B % a == 0:
        flag = 0
        for kouyakusuu in koyakusuu_list:
            if coprime2(a, kouyakusuu):
                continue
            else:
                flag += 1
        if flag == 0:
            koyakusuu_list.append(a)

print(len(set(koyakusuu_list)))

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

Buggy python submission (verdict: Runtime Error):
from math import gcd as bltin_gcd
import itertools

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A, B = map(int, input().split())
koyakusuu_list = []

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)

    # divisors.sort()
    return divisors

for a in make_divisors(A):
    if a == 1:
        koyakusuu_list.append(1)
    elif B % a == 0:
        flag = 0
        for kouyakusuu in koyakusuu_list:
            if coprime2(a, kouyakusuu):
                continue
            else:
                flag += 1
        if flag == 0:
            koyakusuu_list.append(a)

print(len(set(koyakusuu_list)))

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd as bltin_gcd
import itertools

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A, B = map(int, input().split())
koyakusuu_list = []
for a in range(1, A+1):
    if a == 1:
        koyakusuu_list.append(1)
    elif B % a == 0 and A % a == 0:
        flag = 0
        for kouyakusuu in koyakusuu_list:
            if coprime2(a, kouyakusuu):
                continue
            else:
                flag += 1
        if flag == 0:
            koyakusuu_list.append(a)

print(len(set(koyakusuu_list)))

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

Buggy python submission (verdict: Runtime Error):
from math import gcd as bltin_gcd
import itertools

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A, B = map(int, input().split())
koyakusuu_list = []
for a in range(1, A+1):
    if a == 1:
        koyakusuu_list.append(1)
    elif B % a == 0 and A % a == 0:
        flag = 0
        for kouyakusuu in koyakusuu_list:
            if coprime2(a, kouyakusuu):
                continue
            else:
                flag += 1
        if flag == 0:
            koyakusuu_list.append(a)

print(len(set(koyakusuu_list)))

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)

Buggy python submission (verdict: Runtime Error):
from math import gcd as bltin_gcd
import itertools

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A, B = map(int, input().split())
koyakusuu_list = []
for a in range(1, A+1):
    if a == 1:
        koyakusuu_list.append(1)
    elif B % a == 0 and A % a == 0:
        flag = 0
        for kouyakusuu in koyakusuu_list:
            if coprime2(a, kouyakusuu):
                continue
            else:
                flag += 1
        if flag == 0:
            koyakusuu_list.append(a)

print(len(set(koyakusuu_list)))

Fixed submission:
import fractions

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

f = fractions.gcd(A, B)

kouyakusuu = []

if f % 2 == 0:
    kouyakusuu.append(2)
    while f % 2 == 0:
        f = f / 2

i = 3
while i*i <= f:
    if f % i == 0:
        kouyakusuu.append(i)
        while f % i == 0:
            f = f / i
    i += 2
if f != 1:
    kouyakusuu.append(f)
print(len(kouyakusuu)+1)