Harryxun/stf_run huggingface dataset:
Array = [list(map(int,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for l in range (N):
    for j in range (3):
        for k in range (3):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
i=0
for i in range (3): 
    if ArrayBingo[i][0] == 1 and ArrayBingo[i][1] == 1 and ArrayBingo[i][2] == 1:
        checkR=1
    else:
        checkR=0
j=0
for j in range (3):
    if ArrayBingo[0][j] == 1 and ArrayBingo[1][j] == 1 and ArrayBingo[2][j] == 1:
        checkG=1
    else:
        checkG=0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    checkN = 1
else:
    checkN = 0
if checkR==1:
    print('Yes')
    break
elif checkG == 1:
    print('Yes')
    break
elif checkN == 1:
    print('Yes')
    break
else:
    print('No')

### FIXED CODE ###

A = []
A_1 = list(map(int,input().split()))
A_2 = list(map(int,input().split()))
A_3 = list(map(int,input().split()))
A.append(A_1)
A.append(A_2)
A.append(A_3)
B = []
check=0
BingocountR=0
BingocountG=0
N = int(input())
ArrayBingo =[[0,0,0],[0,0,0],[0,0,0]]
for i in range(N):
    B.append(int(input()))
for j in range (3):
    for k in range (3):
        for l in range (N):
            if A[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range(3):
    for j in range(3):
        if ArrayBingo[j][i]==1:
            BingocountR+=1
            if BingocountR ==3:
                check+=1
    BingocountR = 0
for i in range(3):
    for j in range(3):
        if ArrayBingo[i][j]==1:
            BingocountG+=1
            if BingocountG ==3:
                check+=1
    BingocountG = 0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    check += 1
if check>0:
    print('Yes')
else:
    print('No')
import collections
# python template for atcoder
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

n = int(input())
arr = list(map(int, input().split()))
dic = collections.Counter(arr)

for s in ('AC', 'WA', 'TLE', 'RE'):
  print(s + ' x ' + str(dic[s]))

### FIXED CODE ###

n = int(input())
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
  s = input()
  dic[s] += 1
  
for s in ('AC', 'WA', 'TLE', 'RE'):
  print(s + ' x ' + str(dic[s]))
S=input()
if (S="Sunny"):
    print("Cloudy")
elif (S="Cloudy"):
    print("Rainy")
else:
    print("Sunny")

### FIXED CODE ###

S=input()
if (S=="Sunny"): print("Cloudy")
elif (S=="Cloudy"):print("Rainy")
else: print("Sunny")
N, K = map(int, input().split())


def tell_power_number(number):
    i = 0
    while number * (2 ** i) < K:
        i += 1
    return i


ans = 0
if N <= K - 1:
    for k in range(1, N + 1):
        ans += 1 / N * (1 / 2) ** tell_power_number(k)
else:
    for k in range(1, K):
        ans += 1 / N * (1 / 2) ** tell_power_number(k)
    ans += (N - K + 1) / N

print(ans)

### FIXED CODE ###

N, K = map(int, input().split())


def tell_power_number(number):
    i = 0
    while number * (2 ** i) < K:
        i += 1
    return i


ans = 0
if N <= K - 1:
    for k in range(1, N + 1):
        ans += 1 / N * (1 / 2) ** tell_power_number(k)
else:
    for k in range(1, K):
        ans += 1 / N * (1 / 2) ** tell_power_number(k)
    ans += (N - K + 1) / N

print(ans)
n,m=map(int,input().split())
print(int(n*(n+1)/2+m*(m+1)/2)

### FIXED CODE ###

n,m=map(int,input().split())
print(int(n*(n-1)/2+m*(m-1)/2))
print("Yes" if input()[0] == input()[1] == input()[2]\
      or input()[1] == input()[2] == input()[3] else "No")

### FIXED CODE ###

num = input()
print("Yes" if num[0] == num[1] == num[2] or num[1] == num[2] == num[3] else "No")
a,b = map(int,raw_input.split())
if(a<1 or a>9 or b<1 or b >9):
  print("-1")
else:
  print(a*b)
  

### FIXED CODE ###

x,y = map(int,input().split())
if(x<1 or x>9 or y<1 or y>9):
  print("-1")
else:
  print(x*y)
n = int(input())
h = list(map(int, input().split()))
count = 0
for i in range(n):
    if max(h[0:i]) =< h[i]:
        count += 1
print(count)

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
count = 0
for i in range(n):
    if max(h[0:i + 1]) <= h[i]:
        count += 1
print(count)
import math

n,m = map(int, input().rstrip().split())

value = 0
s = [-1] * n

for i in range(m) :
    si,ci = map(int,input().rstrip().split())
    if s[si-1] == -1 :
        s[si-1] = ci
    elif s[si-1] != ci :
        print(-1)
        sys.exit()
    else :
        continue

if s[0] == 0 and n > 1:
    print(-1)
    sys.exit()
if s[0] == -1 :
    s[0] = 1
for i in range(n) :
    if s[i] == -1 :
        s[i] = 0 
if value != -1 :
    for i in range(n) :
        value = value * 10 + s[i] 
print(value)

### FIXED CODE ###

import math

n,m = map(int, input().rstrip().split())

value = 0
s = [-1] * n

for i in range(m) :
    si,ci = map(int,input().rstrip().split())
    if s[si-1] == -1 :
        s[si-1] = ci
    elif s[si-1] != ci :
        value = -1
        break
    else :
        continue

if s[0] == 0 and n > 1:
    value = -1

for i in range(n) :
    if s[i] == -1 :
      if i == 0 and n > 1:
        s[i] = 1
      else :
        s[i] = 0 
if value != -1 :
    for i in range(n) :
        value = value * 10 + s[i] 
print(value)
n = list(map(int,input().split()))

def Is_prime(n):
    if n % 2 == 0:
        return False
    i = 3
    while i < int(n ** (0.5))+ 1:
        if n % i == 0:
            return False
    return True

count = 1
for j in range(0,len(n)):
    if Is_prime(n[i]):
        count += 1

print (count)

### FIXED CODE ###

N = int(input())
n = [int(input()) for i in range(N)]

def Is_prime(n):
    if n == 2:
        return True
    if n == 1:
        return False
    if n % 2 == 0:
        return False
    i = 3
    while i < int(n ** (0.5))+ 1:
        if n % i == 0:
            return False
        i += 2
    return True

count = 0
for j in n:
    if Is_prime(j):
        count += 1

print (count)
import math
N,K = map(int, input().split())
if K > math.factorial(n-1) // (math.factorial(N - 1 - 2) * math.factorial(2)):
    print(-1)
    exit()

for i in range(2,N+1):
    print(1,i)

for i in range(3,K+3):
    print(2,i)

### FIXED CODE ###

import math
N,K = map(int, input().split())
M = (N-1)*(N-2)//2
if K > M:
    print(-1)
    exit()

print(N-1+M-K)
for i in range(2,N+1):
    print(1,i)
s = 2
d = 3
for i in range(M-K):
    print(s,d)
    d+=1
    if d > N:
        s+=1
        d = s+1
h,w,d=(int(i) for i in input().split())
num=[None for i in range(h*w)]
for i in range(h):
    a=list(map(int,input().split()))
    for j in range(w):
        num[a[j]-1]=(i,j)
numm=[None for i in range(h*w)]
for i in range(d):
    numm[i]=0
for i in range(d,h*w):
    numm[i]=numm[i-d]+abs(num[i-1][0]-num[i-d-1][0])+abs(num[i-1][1]-num[i-d-1][1])

q=int(input())
for i in range(q):
    l,r=list(map(int,input().split()))
    print(numm[r]-numm[l])

### FIXED CODE ###

h,w,d=(int(i) for i in input().split())
num=[None for i in range(h*w)]
for i in range(h):
    a=list(map(int,input().split()))
    for j in range(w):
        num[a[j]-1]=(i,j)
numm=[None for i in range(h*w)]
for i in range(d):
    numm[i]=0
for i in range(d,h*w):
    numm[i]=numm[i-d]+abs(num[i][0]-num[i-d][0])+abs(num[i][1]-num[i-d][1])

q=int(input())
for i in range(q):
    l,r=list(map(int,input().split()))
    print(numm[r-1]-numm[l-1])
n = int(input())
a = list(map(int,input().split()))
b = set(a)
if len(a) == len(b):
  print('YES')
else:
  print('NO')v

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
b = set(a)
if len(a) == len(b):
  print('YES')
else:
  print('NO')
T=input()

result=[]

for i in range(len(T)):
    if T[i]=='?':
        if i==len(T)-1:
            result.append('D')
        elif result[i-1]=='P':
            result.append('D')
        else:
            if T[i+1]=='P':
                result.append('D')
            else:
                result.append('P')
    else:
        result.append(T[i])

print(''.join(result))

### FIXED CODE ###

T=input()

result=[]

for i in range(len(T)):
    if T[i]=='?':
        if i==len(T)-1:
            result.append('D')
        elif i==0:
            if T[i+1]=='P':
                result.append('D')
            else:
                result.append('P')
        elif result[i-1]=='P':
            result.append('D')
        else:
            if T[i+1]=='P':
                result.append('D')
            else:
                result.append('P')
    else:
        result.append(T[i])

print(''.join(result))
letters = eval(input("Enter your words: "))
for i in letters:
  print(["Yes" if (i[2]==i[3] and i[4]==i[5]) else "NO" )

### FIXED CODE ###

l = input()
print("Yes" if (l[2]==l[3] and l[4]==l[5]) else "No")
from collections import OrderedDict
X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

summs_ab = []
summs = []
for a in A:
    for b in B:
        summs_ab.append(a+b)
summs_ab.sort(reverse=True)
summs_ab = summs_ab[0:min(3001, X*Y*Z+1)]

for c in C:
    for sab in summs_ab:
        summs.append(sab+c)
summs.sort(reverse=True)

for i in K:
    print(summs[i])

### FIXED CODE ###

x,y,z,k = map(int,input().split())
lisa = list(map(int,input().split()))
lisb = list(map(int,input().split()))
lisc = list(map(int,input().split()))
lisa.sort(reverse=True)
lisb.sort(reverse=True)
lisc.sort(reverse=True)
an = []
ans = []
for num in lisb:
    for nu in lisa:
        an.append(num+nu)
an.sort(reverse=True)
an = an[:min(3001,x*y*z+1)]
for num in lisc:
    for nu in an:
        ans.append(num+nu)
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])
N = int(input())
ans = "No"

for i in range(1, 10):
    if N % i == 0:
        t =  N / i
        if 1 <= t <= 9:
            ans = "Yes"
            break

print(ans)

### FIXED CODE ###

A, B = map(int, input().split())

if A <= 9 and B <= 9:
    ans = A * B
else:
    ans = -1

print(ans)
a,b=map(int,input().split())
ans=0

ans=math.ceil((b-1)/(a-1))
print(ans)

### FIXED CODE ###

import math
a,b=map(int,input().split())
ans=0

ans=math.ceil((b-1)/(a-1))
print(ans)
n = int(input())
b = list(map(int,input().split()))
a = [b[0]]

for i in range(n - 1):
    a.append(min(b[i],b[i+1]))

a.append(b[-1])
print(sum(a))

### FIXED CODE ###

n = int(input())
b = list(map(int,input().split()))
a = [b[0]]

for i in range(n-2):
    a.append(min(b[i],b[i+1]))

a.append(b[-1])
print(sum(a))
n, k = [int(x) for x in input().split()]
a = [int(x)-1 for x in input().split()]

visited = [0]
x = 0
for i in range(n):
  x = a[x]
  if x in visited:
    for j in range(i):
      if visited[j] == x:
        first = j
        break
    T = i - j
  break
  else:
    
mod = (k-first) % T
print(a[first+mod]+1)


### FIXED CODE ###

n, k = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]

visited = [-1 for i in range(n+1)] # 訪れていたら訪れたときの添字を格納する。
points = []
p = 1
while visited[p] == -1:
  visited[p] = len(points)
  points.append(p)
  p = a[p-1] #添字に直す

T = len(points) - visited[p]
s = visited[p]

if k < s:
  print(points[k])
else:
  mod = (k - s) % T
  print(points[s+mod])
import math
N,M =map(int,input().split())

N1=(math.factorial(N))//(math.factorial(N-2)*2)
M1=(math.factorial(M))//(math.factorial(M-2)*2)

print(str(N1+M1))

### FIXED CODE ###

import math
N,M =map(int,input().split())
if N==1 :
    N1=0
elif N==0:
    N1=0
else:
    N1=(math.factorial(N))//(math.factorial(N-2)*2)
    
if M==1:    
    M1=0
    
elif M ==0:
    M1=0
else:
    M1=(math.factorial(M))//(math.factorial(M-2)*2)
    
print(str(N1+M1))
ans1 = 0
ans2 = 0
if n % 2 == 1:
    for i in range((n-3)//2):
        ans1 += 2 * l[i]
    ans1 += l[(n-3)//2] + l[(n-3)//2+1]
    for i in range((n-3)//2+2, n):
        ans1 -= 2 * l[i]

    for j in range((n-1)//2):
        ans2 += 2 * l[j]
    ans2 -= l[(n-1)//2] + l[(n-1)//2+1]
    for j in range((n-1)//2+2, n):
        ans2 -= 2 * l[i]

else:
    for i in range(((n-2)//2)):
        ans1 += 2 * l[i]
    ans1 += l[(n-2)//2]
    ans1 -= l[(n-2)//2+1]
    for i in range((n-2)//2+2, n):
        ans1 -= 2 * l[i]

ans = max(ans1, ans2)
print(ans)

### FIXED CODE ###

n = int(input())
l = [0] * n
for i in range(n):
    l[i] = int(input())
l.sort(reverse=True)
ans1 = 0
ans2 = 0
if n % 2 == 1:
    for i in range((n-3)//2):
        ans1 += 2 * l[i]
    ans1 += l[(n-3)//2] + l[(n-3)//2+1]
    for i in range((n-3)//2+2, n):
        ans1 -= 2 * l[i]

    for j in range((n-1)//2):
        ans2 += 2 * l[j]
    ans2 -= l[(n-1)//2] + l[(n-1)//2+1]
    for j in range((n-1)//2+2, n):
        ans2 -= 2 * l[j]

else:
    for i in range(((n-2)//2)):
        ans1 += 2 * l[i]
    ans1 += l[(n-2)//2]
    ans1 -= l[(n-2)//2+1]
    for i in range((n-2)//2+2, n):
        ans1 -= 2 * l[i]

ans = max(ans1, ans2)
print(ans)
def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2,max):
        fac[i] = fac[i-1]*i%mod
        inv[i] = mod - inv[mod%i]*(mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod

def COM(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k]*finv[n-k]%mod)%mod

mod = 10**9+7

K = int(input())
S = input()
N = len(S)
max = N+K
fac = [0] * max
finv = [0] * max
inv = [0] * max
COMinit()

ans = 0
for i in range(K+1):
    x = COM(N+K-i-1,N-1)
    y = mod(26,i,mod)
    z = mod(25,K-i,mod)
    xyz = ((x*y%mod)*z)%mod
    ans = (ans+xyz)%mod
print(ans)


### FIXED CODE ###

def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2,max):
        fac[i] = fac[i-1]*i%mod
        inv[i] = mod - inv[mod%i]*(mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod

def COM(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k]*finv[n-k]%mod)%mod

mod = 10**9+7

K = int(input())
S = input()
N = len(S)
max = N+K
fac = [0] * max
finv = [0] * max
inv = [0] * max
COMinit()
modlist1 = []
modlist2 = []
a = 1
b = 1
for i in range(K+1):
    modlist1.append(a)
    modlist2.append(b)
    a = a*26%mod
    b = b*25%mod

ans = 0
for i in range(K+1):
    x = COM(N+K-i-1,N-1)
    y = modlist1[i]
    z = modlist2[K-i]
    xyz = ((x*y%mod)*z)%mod
    ans = (ans+xyz)%mod
print(ans)
n=int(inpout())
if n%2==0:
    print(0.5)
else:
    print((n+1)/(2*n))

### FIXED CODE ###

n=int(input())
if n%2==0:
  print(0.5)
else:
  print((n+1)/(2*n))
N,M=map(int,input().split())

A=list(map(int,input().split()))
A.sort(reverse=True)
honsuu=[0,2,5,5,4,5,6,3,7,6]

def ketadp(N,M,A):
  dp=[0]*(N+1)
  for i in range(N):
    for j in A:
      if (i+1-honsuu[j])==0 or (i+1-honsuu[j]>0 and dp[i+1-honsuu[j]]!=0):
        dp[i+1]=max(dp[i+1],dp[i+1-honsuu[j]]+1)
  return dp
  

ans=""
keta=ketadp(N,M,A)
remain=keta[N]
match=N
#print(keta)

while(match>0):
  for i in A:
    #print(i,match,remain,keta[match-honsuu[i]])
    if(keta[match-honsuu[i]]==remain-1) and not (match-honsuu[i]!=0 and remain==1):
      ans+=str(i)
      remain-=1
      match-=honsuu[i]
      break;
print(ans)

### FIXED CODE ###

N,M=map(int,input().split())

A=list(map(int,input().split()))
A.sort(reverse=True)
honsuu=[0,2,5,5,4,5,6,3,7,6]

def ketadp(N,M,A):
  dp=[0]*(N+1)
  for i in range(N):
    for j in A:
      if (i+1-honsuu[j])==0 or (i+1-honsuu[j]>0 and dp[i+1-honsuu[j]]!=0):
        dp[i+1]=max(dp[i+1],dp[i+1-honsuu[j]]+1)
  return dp
  

ans=""
keta=ketadp(N,M,A)
remain=keta[N]
match=N
#print(keta)

while(match>0):
  for i in A:
    #print(i,match,remain,keta[match-honsuu[i]])
    if match-honsuu[i]<0:
      continue;
    if(keta[match-honsuu[i]]==remain-1) and not (match-honsuu[i]!=0 and remain==1):
      ans+=str(i)
      remain-=1
      match-=honsuu[i]
      break;
print(ans)
from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
#from math import *
from collections import defaultdict as dd, deque
def data(): return sys.stdin.readline().strip()
def mdata(): return map(int, data().split())
out=sys.stdout.write
#sys.setrecursionlimit(100000)
INF=int(10e9)


s=data()
t=data()
dp1=[0]*len(s)
for i in range(len(t)):
    m=0
    dp2=dp1.copy()
    for j in range(len(s)):
        if s[j]==t[i]:
            dp2[j]=max(m+1,dp1[j])
        m=max(m,dp1[j])
    dp1=dp2.copy()

dp3=[0]*len(s)
for i in range(len(t)-1,-1,-1):
    m=0
    dp2=dp3.copy()
    for j in range(len(s)-1,-1,-1):
        if s[j]==t[i]:
            dp2[j]=max(m+1,dp3[j])
        m=max(m,dp3[j])
    dp3=dp2.copy()

m=max(dp1)
cnt=max(dp1)
ans=''
for j in range(len(s)-1,-1,-1):
    if dp1[j]>=cnt and dp3[j]>=m-cnt+1:
        ans=s[j]+ans
        cnt-=1
    if cnt==0:
        break
print(ans)



### FIXED CODE ###

from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
#from math import *
from collections import defaultdict as dd, deque
def data(): return sys.stdin.buffer.readline().strip().decode()
def mdata(): return map(int, data().split())
out=sys.stdout.write
#sys.setrecursionlimit(100000)
INF=int(10e9)


s=data()
t=data()
dp=[[0]*(len(s)+1) for i in range(len(t)+1)]
for i in range(1,len(t)+1):
    for j in range(1,len(s)+1):
        if s[j-1]==t[i-1]:
            dp[i][j]=dp[i-1][j-1]+1
        else:
            dp[i][j]=max(dp[i-1][j],dp[i][j-1])
m=max(max(dp))
ans=''
for i in range(len(t)-1,-1,-1):
    for j in range(len(s)-1,-1,-1):
        if dp[i+1][j+1]==m and s[j]==t[i]:
            ans=s[j]+ans
            m-=1
            break
print(ans)
import sys
import math
for line in sys.stdin:
    a, b = map(int, line.split())
    gcdab = math.gcd(a, b)
    print(gcdab, int(a / gcdab * b))

### FIXED CODE ###

import sys
def gcd(a, b):
    for i in range(1, a+1):
        if a % i == 0:
            t = a // i
            if b % t == 0:
                return t
for line in sys.stdin:
    a, b = sorted(map(int, line.split()))
    gcdab = gcd(a, b)
    print(gcdab, a // gcdab * b)
i = input().split()
i_int = [int(n) for n in i]
a = input().split()
A = [int(m) for m in a]
N = i_int[0]
M = i_int[1]

th = int(sum(A)/(4 * M))

##print(threshhold)

c = 0
for val in A:
    if val >= th:
    ##print(val)
        c += 1

if M > c:
    print('No')
else:
    print('Yes')


### FIXED CODE ###

i = input()
l = i.split()
print(l[2] + ' ' + l[0] + ' ' + l[1])
N, Q = list(map(int, input().split()))
p = [0] * Q
x = [0] * Q
nodes = [None] * N
ans = [0] * N

for i in range(N-1):
    a, b = list(map(int, input().split()))

    if nodes[a-1] is None:
         nodes[a-1] = []

    nodes[a-1].append(b-1)

# print()
# print(nodes)

for i in range(Q):
    p, x = list(map(int, input().split()))
    li = nodes[p-1]

    ans[p-1] += x

    if li is None:
        continue

    queue = li.copy()
    while len(queue) != 0:
        n = queue.pop(0)
        ans[n] += x

        if nodes[n] is not None:
            for next_n in nodes[n]:
                queue.append(next_n)

    # print(i, ans)

print(' '.join(map(str, ans)))


### FIXED CODE ###

import sys
import queue
input = sys.stdin.readline
N, Q = map(int, input().split())
 
tree = [[] for i in range(N+1)]
values = [0] * (N+1)
visit = [False]*(N+1)
for _ in range(N-1):
    a, b = map(int, input().split())
    tree[a].append(b)
    tree[b].append(a)
 
for _ in range(Q):
    p, x = map(int, input().split())
    values[p] += x
 
 
q = queue.Queue()
q.put(1)
visit[1] = True
while (not q.empty()):
    now = q.get()
    for next in tree[now]:
        if not visit[next]:
            values[next] += values[now]
            visit[next] = True
            q.put(next)
 
values = values[1:]
print(" ".join(map(str, values)))
N=int(input())
A=list(map(input().split()))

cnt=0

while all(a % 2 == 0 for a in A)
	A = [a /2 for a in A]
	cnt += 1

print(cnt)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))

cnt=0

while all(a % 2 == 0 for a in A):
	A = [a /2 for a in A]
	cnt += 1

print(cnt)
a, b = map(int, input().split())
if (a*b%2)==0:
  return print("Even")
else:
  return print("Odd")

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b)%2==0:
  print("Even")
else:
  print("Odd")
n = int(input())
a = list(map(int,input().split()))

ans = 0

for i in range(10000):
    for j in range(n):
        ans += i%a[j]

    max_ans = max(max_ans,ans)

print(max_ans)


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = sum(a)-len(a)
print(ans)
S=input()
T=input()
num=range(1,4)
x=0
for i in num:
  if S[i]==T[i]:
    X+=1
print(x)    
    


### FIXED CODE ###

s=input()
t=input()
c=0
for i in range(3):
    if s[i]==t[i]:
        c+=1

print(c)
s = [str(i) for i in list(str(input()))]
x = list()
for i in s:
    if i == "0" or i == "1":
      x.append(i)
    else:
        x.pop(-1)
print(x)

### FIXED CODE ###

s = [str(i) for i in list(str(input()))]
x = list()
for i in s:
    if i == "0" or i == "1":
      x.append(i)
    elif i== "B" and x != []:
        x.pop(-1)
print(','.join(x).replace(",",""))
import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
# import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    a, b = ns()

    g = math.gcd(a, b)

    def search(n):
        i = 2
        so = set()
        while n != 1:
            while n % i == 0:
                n //= i
                so.add(i)
            i += 1
        return so

    print(len(search(g)) + 1)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    a, b = ns()

    g = fractions.gcd(a, b)

    def search(n):
        i = 2
        so = []
        while not(n == 1 or i * i > n):
            while n % i == 0:
                n //= i
                so.append(i)
            i += 1
        if n != 1:
            so.append(n)

        return so

    ans = set(search(g))
    print(len(ans) + 1)


if __name__ == '__main__':
    main()
from math import factorial
n = int(input())
k = int(input())
print(factorial(n+k-1)//factorial(k)//factorial(n-1) % 1000000007)


### FIXED CODE ###

# ABC137A

a, b = map(int, input().split())
print(max(a+b, a-b, a*b))
N, Q = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(N - 1)]
px = [list(map(int, input().split())) for i in range(Q)]

root = [[] for i in range(N + 1)]
result = [0 for i in range(N + 1)]

for i in range(N - 1):
    a = ab[i][0]
    b = ab[i][1]
    root[a].append(b)
    root[b].append(a)

for i in range(Q):
    p = px[i][0]
    x = px[i][1]
    result[p] = result[p] + x


def dfs(num):
    if len(root[num]) == 0:
        return
    else:
        for i in range(len(root[num])):
            next_point = root[num][i]
            result[next_point] = result[next_point] + result[num]
            root[next_point].remove(num)
            dfs(next_point)


dfs(1)
print(*result[1:])

### FIXED CODE ###

N, Q = map(int,input().split()) # 複数の数字を変数に格納
List_ab = [list(map(int,input().split())) for i in range(N-1)] # [[1,2],[3,4],[5,6]]
List_px = [list(map(int,input().split())) for i in range(Q)] # [[1,2],[3,4],[5,6]]

count_list = [0]*N

List_ab.sort()

for i in range(Q):
    count_list[List_px[i][0]-1] += List_px[i][1]
        
for i in range(N-1):
    count_list[List_ab[i][1]-1] += count_list[List_ab[i][0]-1]
    
print(*count_list)