Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  if n == 1:
    return ans
  for k in range(3, n+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  return ans
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, n+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  return ans
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  prime=[1]
  if n % 2 == 0:
    prime.append(2)
    while n % 2 == 0:
      n = n // 2
  for k in range(3, n+1, 2):
    if n % k == 0:
      prime.append(k)
      while n % k == 0:
        n = n // k
    if n == 1:
      return prime
  return prime
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(len(primeNum(n)))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Runtime Error):
from fractions import gcd
 
def primeNum(n):
  prime=[1]
  if n % 2 == 0:
    prime.append(2)
    while n % 2 == 0:
      n = n // 2
  for k in range(3, n+1, 2):
    if n % k == 0:
      prime.append(k)
      while n % k == 0:
        n = n // k
    if n == 1:
      return prime
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(len(primeNum(n)))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  prime=[1]
  while n % 2 == 0:
    prime.append(2)
    n = n // 2
  for k in range(3, n+1, 2):
    while n % k == 0:
      prime.append(k)
      n = n // k
  return set(prime)
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(len(primeNum(n)))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  prime=[1]
  if n % 2 == 0:
    prime.append(2)
    while n % 2 == 0:
      n = n // 2
  for k in range(3, n+1, 2):
    if n % k == 0:
      prime.append(k)
      while n % k == 0:
        n = n // k
  return prime
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(len(primeNum(n)))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
 
def primeNum(n):
  prime=[1]
  for k in range(2, n+1):
    if n % k == 0:
      prime.append(k)
      while n % k == 0:
        n = n // k
  return prime
 
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(len(primeNum(n)))

Fixed submission:
from fractions import gcd
 
def primeNum(n):
  ans = 1
  if n == 1:
    return ans
  if n % 2 == 0:
    ans += 1
    while n % 2 == 0:
      n = n // 2
  for k in range(3, int(n**0.5)+1, 2):
    if n % k == 0:
      ans += 1
      while n % k == 0:
        n = n // k
    if n == 1:
      return ans
  if n != 1:
    ans += 1
  return ans
  
a,b = list(map(int, input().split()))
n=gcd(a,b)
print(primeNum(n))