Buggy python submission (verdict: Time Limit Exceeded):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

upper = int(math.sqrt(minAB+1))
ans = 1

for i in range(2, minAB+1):
    if A % i != 0 or B % i != 0:
        continue;
    falg = True
    for j in range(2, i-1):
        if(i % j == 0):
            falg = False
            break
    if falg:
        ans+=1
        
print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)
"""
upper = int(math.sqrt(minAB+1))
ans = 1

for i in range(2, upper+1):

    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False

    if A % i == 0  and B % i == 0:
        ans += 1
"""
ans = 1
print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)
"""
upper = int(math.sqrt(minAB+1))
ans = 1

for i in range(2, upper+1):

    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False

    if A % i == 0  and B % i == 0:
        ans += 1
"""
print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)

upper = int(math.sqrt(minAB+1))
ans = 1
"""
for i in range(2, upper+1):

    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False

    if A % i == 0  and B % i == 0:
        ans += 1
"""
print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)

upper = int(math.sqrt(minAB+1))
ans = 1
for i in range(2, upper+1):
    """
    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False
    """
    if A % i == 0  and B % i == 0:
        ans += 1

print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))

Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().strip().split())

minAB = min(A,B);

hurui = [True] * (minAB+1)

upper = int(math.sqrt(minAB+1))
ans = 1
for i in range(2, upper+1):
    if not(hurui[i]):
        continue
    
    for j in range(2*i, minAB+1, i):
        hurui[j] = False
    
    if A % i == 0  and B % i == 0:
        ans += 1
        
print(ans)

Fixed submission:
import math
A, B = map(int, input().strip().split())

divisors = []

minAB = min(A,B)
maxAB = max(A,B)
upper = int(math.sqrt(minAB+1) + 1)
ans = 1

for i in range(1, upper):
    if minAB % i == 0:
        divisors.append(i)
        if i != minAB//i:
            divisors.append(minAB//i)

divisors.sort()
#print(divisors)

flag = [True] * len(divisors)
for i, num in enumerate(divisors):
    if maxAB % num != 0:
        flag[i] = False
        continue
    for x in divisors:
        if x == 1 :
            continue
        if x > math.sqrt(num):
            break
        if num % x ==0:
            flag[i] = False
            break

print(flag.count(True))