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

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))

Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
n=math.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))     

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))

Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))          

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))

Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)
      #if i != n // i :
      #  divisors.append(n//i)
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))          

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))

Buggy python submission (verdict: Runtime Error):
import math
A,B=map(int, input().split())
n=math.gcd(A, B)
for i in range(1, int(n**0.5)+1):
    flag=0
    if n % i == 0:
      for j in range(2, int(i**0.5)+1):
        if i%j==0:
          flag=1
          break
    if flag==0:
      divisors.append(i)      
flag=0
for j in range(1, int(n**0.5)+1):
    if n%j==0:
      flag=1
      break
if flag==0:
      divisors.append(n)
print(len(divisors))   

Fixed submission:
import fractions
import math
A,B=map(int, input().split())
n=fractions.gcd(A, B)
divisors = []
for i in range(1, int(n**0.5)+1):
    flag=-1
    lag=-1
    if n % i == 0:
      flag=0
      for j in range(2, int(i**0.5)+1):
        if i%j==0 and i!=j:
          flag=1
          break
      if i != n // i :
        lag=0
        for j in range(2, int((n // i)**0.5)+1):
          if (n // i)%j==0 and i!=j:
            lag=1
            break
    if flag==0:
      divisors.append(i)
    if lag==0:
      divisors.append(n//i)
#flag=0
#print(divisors)
#for j in range(2, int(n**0.5)+1):
#    if n%j==0:
#     flag=1
 #     break
#if flag==0:
 #     divisors.append(n)
print(len(divisors))