Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a > i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))

Fixed submission:
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a >= i*i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    ans = 1
    while 1:
        flag = True
        for i in range(2,a+1):
            if a % i == 0 and a != i:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
                break
        if flag:
            sosuu_list.add(a)
            return sosuu_list,ans

a,ans = sosuu(g)
print(len(a))

Fixed submission:
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a >= i*i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
	a,b = map(int,input().split())

	def sosuu(a):
	    sosuu_list = set()
	    while 1:
	        flag = True
	        for i in range(2,a+1):
	            if a % i == 0 and a != i:
	                a = a//i
	                sosuu_list.add(i)
	                flag = False
	                break
	        if flag:
	            sosuu_list.add(a)
	            return sosuu_list

	a = sosuu(a)
	# print(a)
	ans = 1
	for aa in a:
	    if b % aa == 0 and aa != 1:
	        ans += 1
	print(ans)

if __name__ == "__main__":
	main()

Fixed submission:
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a >= i*i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

a,b = map(int,input().split())

def sosuu(a):
    sosuu_list = set()
    while 1:
        flag = True
        for i in range(2,a+1):
            if a % i == 0 and a != i:
                a = a//i
                sosuu_list.add(i)
                flag = False
                break
        if flag:
            sosuu_list.add(a)
            return sosuu_list

a = sosuu(a)
# print(a)
ans = 1
for aa in a:
    if b % aa == 0 and aa != 1:
        ans += 1
print(ans)

Fixed submission:
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a >= i*i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

a,b = map(int,input().split())

def sosuu(a):
    sosuu_list = set()
    while 1:
        flag = True
        for i in range(2,a+1):
            if a % i == 0 and a != i:
                a = a//i
                sosuu_list.add(i)
                flag = False
                break
        if flag:
            sosuu_list.add(a)
            return sosuu_list

a = sosuu(a)
# print(a)
ans = 1
for aa in a:
    if b % aa == 0 and aa != 1:
        ans += 1
print(ans)

Fixed submission:
from collections import Counter
from fractions import gcd

a,b = map(int,input().split())

g = gcd(a,b)

def sosuu(a):
    sosuu_list = set()
    sosuu_list.add(1)
    i = 2
    while 1:
        flag = True
        while a >= i*i:
            if a % i == 0:
                # print(a,i)
                a = a//i
                sosuu_list.add(i)
                flag = False
            else:
                i += 1
        if flag:
            sosuu_list.add(a)
            return sosuu_list
        i += 1

a = sosuu(g)
print(len(a))