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

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 10000000:
        print(ans+2)
        exit()
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

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

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

ans = 0
i = 2
check = False
while c != 1:
    while c % i == 0:
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
check = False
while c != 1:
    while c % i == 0:
        c = c // i
        check = True
    print(i)
    i = i + 1
    if check:
        ans += 1
    check = False
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

Buggy python submission (verdict: Runtime Error):
from functions import gcd

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
check = False
while c != 1:
    while c % i == 0:
        c = c // i
        check = True
    print(i)
    i = i + 1
    if check:
        ans += 1
    check = False
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

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

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
check = False
while c != 1:
    while c % i == 0:
        c = c // i
        check = True
    print(i)
    i = i + 1
    if check:
        ans += 1
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

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

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
while c != 1:
    while c % i == 0:
        c = c // i
    #print(c,i,ans)
    i = i + 1
    ans += 1
    
print(ans + 1)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

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

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
while c != 1:
    while c % i == 0:
        c = c // i
    #print(c,i,ans)
    i = i + 1
    ans += 1
    
print(ans)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)

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

a,b = map(int,input().split())
c = math.gcd(a,b)

ans = 0
i = 2
while c != 1:
    while c % i == 0:
        c = c // i
    print(c,i,ans)
    i = i + 1
    ans += 1
    
print(ans)

Fixed submission:
from fractions import gcd

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

ans = 0
i = 2
check = False
while c != 1:
    #print(c,i)
    while c % i == 0:
        #print('a')
        c = c // i
        check = True
    i = i + 1
    if check:
        ans += 1
    check = False
    if i > 1000000:
        print(ans+2)
        exit()
print(ans + 1)