Harryxun/stf_run huggingface dataset:
s=input()
k=int(input())
for a,i in enumerate(s):
    if i!="1":
        x=a
        y=i
        break

if x+1<=k: print(y)
else: print(1)

### FIXED CODE ###

s=input()
k=int(input())
x=-1
y=""
for a,i in enumerate(s):
    if i!="1":
        x=a
        y=i
        break

if x!=-1 and x+1<=k: print(y)
else: print(1)
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return sorted(divisors)



X = ii()
'''
a = make_divisors(X)
ind = bisect.bisect_left(a, X**0.2)

for num in a[:ind+1]:
    for i in range(num):
        j = num - i
        if i**5 + j**5 == X:
            print(i, (-1)*j)
            exit()
'''
num = int(X**0.2)+1
for i in range(10**6):
    tmp = X - i**5
    b = tmp**0.2
    if math.floor(b) == b:
        print(i, (-1)*int(b))
        exit()
    b2 = ((-1)*tmp)**0.2
    if type(b2) == float:
        if math.floor(b2) == b2: 
            print(i, int(b2))
            exit()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

X = ii()

lim = 10**3
for a in range((-1)*lim, lim+1):
    for b in range((-1)*lim, lim+1):
        if a**5 -b**5 == X:
            print(a, b)
            exit()
import math

stri = input()
ary = stri.split()
n:int = int(ary[0])
k:int = int(ary[1])

ans1=int( 1 * (n-k +1 ))
ansi:int= int(ans1)
print(ansi)

for i in range(2,k+1):
    ansi = ansi * (k- i + 1) / ( i - 1 ) *  (n-k - i + 2) / i 
    print(int(ansi % 1000000007))

### FIXED CODE ###

import math
 
stri = input()
ary = stri.split()
n = int(ary[0])
k = int(ary[1])
 
ans1 = 1 * (n-k +1 )
ansi = 0
ansi = int(ans1)
print(ansi)
for i in range(2,k+1):
    ansi = ansi * (k- i + 1) // int( i - 1 ) *  (n-k - i + 2) // int(i) 
    type(ansi)
    print(int(ansi % int(1000000007)))
A = list(int(input))
if 7 in A: print('Yes')
else: print('No')


### FIXED CODE ###

n = input()
A = list(n)
if '7' in A: print('Yes')
else: print('No')
s = int(input())
checker = True
for i in range(3):
    if s[i] == s[i+1]:
        checker=False

if checker:
    print("Good")
else:
    print("bad")

### FIXED CODE ###

s = input()
checker = True
for i in range(3):
    a , b = int(s[i]), int(s[i+1])
    if a == b:
        checker=False

if checker:
    print("Good")
else:
    print("Bad")
n = int(input())
a = [int(i) for i in input().split()]
b = [len(i for i in a if i == j) for j in range(n+1)]
print(b[1:])

### FIXED CODE ###

import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
b = np.zeros(n)
for i in a: b[i-1] += 1
for i in b: print(int(i))
a = map.int(input().split())
print(15 - sum(a))

### FIXED CODE ###

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

if a == 0 :
  print(1)
elif b == 0 : 
  print(2)
elif c == 0 :
  print(3)
elif d == 0 : 
  print(4)
else :
  print(5)
x = int(input())
for i in range(x):
    if i*(i+1)/2 > x:
        ans =i
        break 
    else:
        continue
print(ans)

### FIXED CODE ###

from math import ceil
x = int(input())
ans = ceil(((1+8*x)**.5 -1)/2)
print(ans)
n=int(raw_input())
N=map(int,raw_input().split())
if len(set(N))==1:
    print 0
else:
    add=0
    if sum(N)%n==0:
        a=sum(N)/n
    else:
        a=sum(N)/n+1
    for i in N:
        add+=(a-i)**2
    print add

### FIXED CODE ###

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

paskal3 = [[1]]
for i in range(1, n):
    l = [1]
    for j in range(1, i):
        l.append(paskal3[i-1][j-1]+paskal3[i-1][j])
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    return paskal3[n][r]


for i in range(1,k+1):
    print(comb(n-k+1, i) * comb(k-1, i-1))


### FIXED CODE ###

N, B = map(int, input().split())
R = N-B
MOD = 10**9+7

paskal3 = [[1]]
for i in range(1, N+5):
    l = [1]
    for j in range(1, i):
        l.append((paskal3[i-1][j-1]+paskal3[i-1][j]) % MOD)
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    try:
        return paskal3[n][r]
    except:
        return 0


for i in range(1, B+1):
    print((comb(R+1, i) * comb(B-1, i-1)) % MOD)
N = int(input())
A = [int(x) for x in input().split()]

import fractions

G = A[0]
for i in range(N):
    G = G * A[i] // fractions.gcd(G, A[i])

ans = 0
for j in range(N):
    ans += G / A[j]

print(ans % (10 ** 9 + 7))

### FIXED CODE ###

from fractions import gcd
from functools import reduce
mod=10**9+7
n=int(input())
a=[int(i) for i in input().split()]
l=reduce(lambda x,y:x//gcd(x,y)*y,a)
ans=sum(map(lambda x:l//x,a))
print(ans%mod)
import sympy
from collections import deque

N = int(input())
A = list(map(int,input().split()))
if len(set(A)) == 1:
    print(0)
else:
    counter = 0
    A.sort()
    d = deque(A)
    for i in range(len(d)):
        p = d.popleft()
        divs = sympy.divisors(p)
        if set(divs) & set(d) == set():
            counter += 1
        d.append(p)
    print(counter)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
A.sort()
l = [0] * A[-1]
for i in range(N):
    l[A[i] - 1] += 1
for i in range(N):
    if l[A[i] - 1] > 1:
        l[A[i] - 1] = 0
    elif l[A[i] - 1] == 0:
        continue
    temp = A[i]
    while True:
        temp += A[i]
        if temp > A[-1]:
            break
        l[temp - 1] = 0
print(sum(l))
N = int(input())
for i in range(N):
    if i * i > N:
        ans = (i - 1) ** 2
        break
print(ans)


### FIXED CODE ###

N = int(input())
ans = 1
for i in range(N):
    if i * i > N:
        ans = (i - 1) ** 2
        break
print(ans)
N = int(input())
S = input()

tmp = [int(p.replace('W', '-1')) if p == 'W' else int(p.replace('E', '1')) for p in list(S)]

result = []
cnt = 0
for CTO in range(N):
    for MEM in range(N):
        print(CTO)
        if MEM == CTO:
            continue
        if CTO < MEM:
            if tmp[CTO] == -1:
                if (tmp[MEM] + tmp[CTO]) == 0:
                    cnt += 1
            if tmp[CTO] == 1:
                if (tmp[MEM] + tmp[CTO]) != 0:
                    cnt += 1

        if MEM < CTO:
            if tmp[CTO] == -1:
                if (tmp[MEM] + tmp[CTO]) != 0:
                    cnt += 1
            if tmp[CTO] == 1:
                if  (tmp[MEM] + tmp[CTO]) == 0:
                    cnt += 1
        print(cnt)
    result.append(cnt)
    cnt = 0

result_x = [ result[i] for i in range(N) if result[i] != 0]
print(min(result_x))

### FIXED CODE ###

N = int(input())
S = list(input())

w = 0
e = S[1:].count('E')

leader = S[0]
min_mem=e
cnt_mem=0

for i in range(1, N):
    if leader ==  'W':
        w += 1
    leader = S[i]

    if leader == 'E':
        e -= 1

    cnt_mem = w + e
    if cnt_mem < min_mem:
        min_mem = cnt_mem

print(min_mem)
n,m,s,t = map(int,input().split())
uvab = [list(map(int,input().split())) for _ in range(m)]

# import
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

cost_e = np.zeros((n,n))
cost_s = np.zeros((n,n))

for i in uvab:
    u,v,a,b = i
    cost_e[u-1][v-1] = a
    cost_s[u-1][v-1] = b
    cost_e[v-1][u-1] = a
    cost_s[v-1][u-1] = b

csr_e = csr_matrix(cost_e)
csr_s = csr_matrix(cost_s)

# en = shortest_path(csr_e, indices=s-1 ,method='D')
# sn = shortest_path(csr_s, indices=t-1 ,method='D')
en = dijkstra(csr_e, indices=s-1)
sn = dijkstra(csr_s, indices=t-1)


ans = [10**15] * n
min_ = en[n-1] + sn[n-1]
for i in range(n-1, -1, -1):
    tmp = en[i] + sn[i]
    min_ = min(min_, tmp)
    ans[i] -= min_

for i in ans:
    print(int(i))

### FIXED CODE ###

import sys
input = sys.stdin.readline

n,m,s,t = map(int,input().split())


links_e = [[] for _ in range(n+1)]
links_s = [[] for _ in range(n+1)]
for _ in range(m):
    u,v,a,b = map(int, input().split())
    links_e[u].append((a,v))
    links_e[v].append((a,u))
    links_s[u].append((b,v))
    links_s[v].append((b,u))

# dijkstra
import heapq
def dijkstra(links, start, n):
    inf = 10**10
    d = [inf] * (n+1)
    d[start] = 0
    hq = []
    used = set()
    used.add(start)
    for i in links[start]:
        heapq.heappush(hq, i)
    while(hq):
        cost,i = heapq.heappop(hq)
        if( i in used):
            continue
        d[i] = cost
        used.add(i)
        for tmp in links[i]:
            cost_next, j = tmp
            if(not j in used):
                heapq.heappush(hq, (cost+cost_next, j))
    return d

d_e = dijkstra(links_e, s, n)
d_s = dijkstra(links_s, t, n)

ans = [0] * (n+1)
min_cost = 10**15
for i in range(n,0,-1):
    min_cost = min(min_cost, d_e[i]+d_s[i])
    ans[i] = min_cost

for i in range(1,n+1):
    print(10**15 - ans[i])
n,a,b,c,d = map(int, input().split())
s = str(input())

a,b,c,d = a-1,b-1,c-1,d-1

cnt = 0
for i in range(a,max(c,d)+1):
    if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0

cnt = 0
if c > d:
    for i in range(b,d+1):
        if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                if i-1 != d
                print('Yes')
                exit()
        else:
            cnt = 0
        if i == c:
            print('No')
            exit()
else:
    print('Yes')



### FIXED CODE ###

n,a,b,c,d = map(int, input().split())
s = str(input())

a,b,c,d = a-1,b-1,c-1,d-1

cnt = 0
for i in range(a,max(c,d)+1):
    if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0

cnt = 0
if b >= 2:
    if s[b-2] == '.' and s[b-1] == '.':
        cnt = 2

if s[b-1] == '.':
    cnt = 1

if c > d:
    if s[d-1] == '.' and s[d+1] == '.':
        print('Yes')
        exit() 
    for i in range(b,d+1):
        if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                print('Yes')
                exit()
        else:
            cnt = 0
        if i == d:
            print('No')
            exit()
else:
    print('Yes')
S1=input()
S2='CODEFESTIVAL2016'

ans=0
for i in len(S):
    if S1[i]!=S2[i]:
        ans+=1

print(ans)

### FIXED CODE ###

S1=input()
S2='CODEFESTIVAL2016'

ans=0
for i in range(len(S1)):
    if S1[i]!=S2[i]:
        ans+=1

print(ans)
X = int(input())
def isPrime(N):
  for i in range(2, ceil(N ** (1/2)):
    if N % i == 0:
      return False
  return True
while isPrime(X) == False:
  X += 1
print(X)

### FIXED CODE ###

import math
X = int(input())
def isPrime(N):
  for i in range(2, math.ceil(math.sqrt(X))):
    if N % i == 0:
      return False
  return True
while isPrime(X) == False:
  X += 1
print(X)
li = input().split()
count = 0
for num in range(li[0],li[1]+1):
  if num % li[2] == 0:
    count += 1
print(count)

### FIXED CODE ###

li = list(map(int,input().split()))
count = 0
for num in range(li[0],li[1]+1):
  if num % li[2] == 0:
    count += 1
print(count)
import math
N, K = map(int, input().split())
A = [int(a) for a in input().split()]

A.sort()

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
Ne = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, Ne + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )



maxi = 0
for i in range(K-1,N):
    maxi += A[i]*cmb(i, K-1, mod)

mini = 0
A.sort(reverse=True)
for j in range(K-1,N):
    mini += A[j]*cmb(j,K-1,mod)

print(maxi-mini)


### FIXED CODE ###

import math
N, K = map(int, input().split())
A = [int(a) for a in input().split()]

A.sort()

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
Ne = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, Ne + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )



maxi = 0
for i in range(K-1,N):
    maxi += A[i]*cmb(i, K-1, mod)

mini = 0
A.sort(reverse=True)
for j in range(K-1,N):
    mini += A[j]*cmb(j, K-1, mod)

print((maxi-mini)%mod)
#FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[0]
ylist=[0]
if s[0]=="T":
    for i in range(len(lists)):
        if i%2==0:
            xlist.append(len(lists[i]))
        else:
            ylist.append(len(lists[i]))
elif s[0]=="F":
    for i in range(len(lists)):
        if i%2==0:
            xlist.append(len(lists[i]))
        else:
            ylist.append(len(lists[i]))
    gx-=xlist[0]
    del xlist[0]
Xsum=sum(xlist)
Ysum=sum(ylist)
if (Xsum+gx)%2!=0 or (Ysum+gy)%2!=0:
    print("No")   
else:
    gx1=(Xsum+gx)//2
    gx2=(Xsum-gx)//2
    gy1=(Ysum+gy)//2
    gy2=(Ysum-gy)//2
    dpx=[[False for i in range(Xsum+2)] for i in range(len(xlist)+2)]
    dpy=[[False for i in range(Ysum+2)] for j in range(len(ylist)+2)]
    #dpx[i][j]でi番目のカードまでを足して、値ｊを取れるか判定する
    dpx[0][0]=True
    dpy[0][0]=True
    for i in range(len(xlist)):
        for j in range(Xsum+2):
            dpx[i+1][j]=dpx[i][j-xlist[i]] or dpx[i][j]
    for i in range(len(ylist)):
        for j in range(Ysum+2):
            dpy[i+1][j]=dpy[i][j-ylist[i]] or dpy[i][j]        
    if (dpy[len(ylist)][gy1] or dpy[len(ylist)][gy2]) and (dpx[len(xlist)][gx1] or dpx[len(xlist)][gx2]):
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

      #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
    for i in range(len(lists)):
        if i%2==0:
            xlist.append(len(lists[i]))
        else:
            ylist.append(len(lists[i]))
elif s[0]=="F":
    for i in range(len(lists)):
        if i%2==0:
            xlist.append(len(lists[i]))
        else:
            ylist.append(len(lists[i]))
    gx-=xlist[0]
    del xlist[0]
Xsum=sum(xlist)
Ysum=sum(ylist)


if (Xsum+gx)%2!=0 or (Ysum+gy)%2!=0:
    print("No")   
else:
    gx1=(Xsum+gx)//2
    gx2=(Xsum-gx)//2
    gy1=(Ysum+gy)//2
    gy2=(Ysum-gy)//2
    dpx=[[False for i in range(Xsum+2)] for j in range(len(xlist)+2)]
    dpy=[[False for i in range(Ysum+2)] for j in range(len(ylist)+2)]
    #dpx[i][j]でi番目のカードまでを足して、値ｊを取れるか判定する
    dpx[0][0]=True
    dpy[0][0]=True
    for i in range(len(xlist)):
        for j in range(Xsum+2):
            dpx[i+1][j]=dpx[i][j-xlist[i]] or dpx[i][j]
    for i in range(len(ylist)):
        for j in range(Ysum+2):
            dpy[i+1][j]=dpy[i][j-ylist[i]] or dpy[i][j]    
    #ここまではあってそうなことがわかった
    flag1=False
    if 0<= gy1<= Ysum:   
        if dpy[len(ylist)][gy1]:
            flag1=True
    flag2=False
    if 0<=gy2<= Ysum :
        if dpy[len(ylist)][gy2]:
            flag2=True
    flag3=False
    if 0<=gx1<= Xsum:
        if dpx[len(xlist)][gx1]:
            flag3=True
    flag4=False
    if 0<=gx2<= Xsum:
        if dpx[len(xlist)][gx2]:
            flag4=True
    if (flag1 or flag2) and (flag3 or flag4):
        print("Yes")
    else:
        print("No")
n = int(input()) 
t = list(map(int,input().strip().split()))[:n] 
m = int(input())
p=[]
x=[]
for _ in range(m):
    a,b = map(int,input().split())
    p.append(a)
    x.append(b)
s=sum(t)
for i in range(m):
    T=s
    T-=t[p[i]-1]
    T+=x[p[i]-1]
    print(T)

### FIXED CODE ###

n = int(input())
t = list(map(int,input().split()))
s = sum(t)
m = int(input())
for _ in range(0,m):
    p,x = map(int,input().split())
    print(s-t[p-1]+x)
S = list(input())

a = S[0]
c = 1
while len(S) >1:
  if S[1] == a:
    if len(S) >2:
      a = S[1:3]
      S = [a] + S[3:]
      c += 1
    else:
      break
  else: 
    a = S[1]
    S = [a] + S[2:]
    c += 1
    print(S)
print(c) 

### FIXED CODE ###

ss = input()

n = len(ss)
arrs = [ss[0]]

for i in range(1, n):
    if len(arrs[-1]) == 2:
        if arrs[-1].endswith(ss[i]):
            arrs.append('*')
        else:
            arrs.append(ss[i])

    else:
        if arrs[-1] == ss[i]:
            arrs.append(ss[i: i + 2])
        else:
            arrs.append(ss[i])

c = arrs.count('*')

if arrs[-1] == arrs[-2]:
    ans = len(arrs) - 1

else:
    ans = len(arrs)
print(ans - c)
from sys import stdin
N,Y=list(map(int,stdin.readline().strip().split()))
YY=abs(Y)
NN=abs(N)
count=YY-NN
if count<0:
   print(NN-YY+1)
elif count==0:print(0)
else:
    if N>0 and Y>0:
        print(count)
    elif N>0 and Y<0:
        print(count+1)
    elif N<0 and Y>0:
        print(count+1)
    else:N<0(count+2)

### FIXED CODE ###

from sys import stdin
N,Y=list(map(int,stdin.readline().strip().split()))
count=0
flag=False
if abs(N)-abs(Y)==0:
    print(1)
    exit()
if N>Y and abs(N)>abs(Y) or N>Y and N<0:
    count+=1
    N*=-1
    flag=True
YY=abs(Y)
NN=abs(N)
ans=0
if YY>NN:
    ans=YY-NN
else:
    ans=NN-YY
N+=ans
if Y==N:
    print(count+ans)
else:
    print(count+ans+1)
from collections import Counter
n = int(input())
list_ = [tuple(map(int, input().split())) for i in range(n)]
list_.sort()

ab = []
for i in range(len(list_)-1):
    x_1, y_1 = list_[i]
    
    for j in range(i+1, len(list_)):
        x_2, y_2 = list_[j]
        a = x_2 - x_1
        b = y_2 - y_1
        ab.append((a, b))

p, q = Counter(ab).most_common()[0][0]

res = 0
while len(list_):
    res += 1
    x, y = list_.pop(0)
    while True:
        if (x+p, y+q) in list_:
            list_.remove((x+p, y+q))
            x, y = x+p, y+q
        else:
            break

print(res)            

### FIXED CODE ###

from collections import Counter
n = int(input())
list_ = [tuple(map(int, input().split())) for i in range(n)]
list_.sort()

if n == 1:
    print(1)
else:
    ab = []
    for i in range(len(list_)-1):
        x_1, y_1 = list_[i]
        
        for j in range(i+1, len(list_)):
            x_2, y_2 = list_[j]
            a = x_2 - x_1
            b = y_2 - y_1
            ab.append((a, b))

    p, q = Counter(ab).most_common()[0][0]

    res = 0
    while len(list_):
        res += 1
        x, y = list_.pop(0)
        while True:
            if (x+p, y+q) in list_:
                list_.remove((x+p, y+q))
                x, y = x+p, y+q
            else:
                break

    print(res)
num = int(input())
value = [int(s) for s in input().split()]
cost = list(map(int, input().split()))

sum = 0
for i in range(num):
	if (value[i] - cost[i] > 0):
      sum += value[i] - cost[i]
print(sum)

### FIXED CODE ###

num = int(input())
value = [int(s) for s in input().split()]
cost = list(map(int, input().split()))

sum = 0
for i in range(num):
  if (value[i] - cost[i] > 0):
    sum += value[i] - cost[i]
print(sum)
N = int(input())
if N%1000 != 0:
	maisu = N//1000 + 1
else:
  maisu = N//1000
print(maisu*1000-k)

### FIXED CODE ###

N = int(input())
if N%1000 != 0:
	maisu = N//1000 + 1
else:
  maisu = N//1000
print(maisu*1000-N)
a,b,c=map(int,input().split())
if a<c<b or c<b<a:
print("Yes")
else:
print("No")

### FIXED CODE ###

a,b,c=map(int,input().split())
if a<c<b or b<c<a:
  print("Yes")
else:
  print("No")
a,b = map(int,input().split())

if a > b:
op = '>'
elif a < b:
op = '<'
else:
op = '=='

print("a %s b"%op)



### FIXED CODE ###

a,b = map(int, input().split())
if a<b:
	print("a < b")
elif a==b:
	print("a == b")
else:
	print("a > b")
# -*- coding: utf-8 -*-
# 入力
a = list(str(input))
# String to Int
num = [int(s) for s in a]
# Output
print(sum(num))


### FIXED CODE ###

# -*- coding: utf-8 -*-
a = list(str(input()))
num = [int(s) for s in a]
print(sum(num))
import sys
st = input()
if len(st) < 3:
    print('No')
    sys.exit()
if st[0] == 'Y':
    if st[1] == 'A':
        if st[2] == 'K':
            if st[3] == 'I':
                print('Yes')
            else:
                print('No')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')




### FIXED CODE ###

import sys
st = input()
if len(st) < 4:
    print('No')
    sys.exit()
if st[0] == 'Y':
    if st[1] == 'A':
        if st[2] == 'K':
            if st[3] == 'I':
                print('Yes')
            else:
                print('No')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')
def f(b, n):
    return n if n < b else n % b + f(b, n // b)

def solve():
    N, S = map(int, open(0))

    if N == S:
        return N + 1

    sqr = int(N ** 0.5)

    for b in range(2, sqr + 1):
        if f(b, N) == S:
            return b

    M = N - S
    for p in reversed(range(1, sqr + 1)):
        b = M // p + 1
        if f(b, N) == S:
            return b

    return -1

print(solve())

### FIXED CODE ###

def f(b, n):
    return n if n < b else n % b + f(b, n // b)

def solve():
    N, S = map(int, open(0))

    if N == S:
        return N + 1

    sqr = int(N ** 0.5)

    for b in range(2, sqr + 1):
        if f(b, N) == S:
            return b

    M = N - S
    for p in reversed(range(1, sqr + 1)):
        b = M // p + 1
        if b >= 2 and f(b, N) == S:
            return b

    return -1


print(solve())
d,n=map(int,input().split())
if d==1:
    base=100
elif d==2:
    base=10000
tmp=base
if d==0:
    print(n)
    exit()
for i in range(n-1):
   tmp+=base
print(tmp)

### FIXED CODE ###

d,n=map(int,input().split())
if d==0 and n!=100:
    print(n)
elif d==0 and n==100:
    print(101)
elif d==1 and n!=100:
    print(n*100)
elif d==1 and n==100:
    print(10100)
elif d==2 and n!=100:
    print(n*10000)
elif d==2 and n==100:
    print(1010000)
li = list(str.map(input().split()))
count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

### FIXED CODE ###

a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)
import math

def factorization(n):
    arr = []
    tmp = n
    for div in range(2, int(-(-n**0.5//1))+1):
        if tmp % div == 0:
            cnt = 0
            while tmp % div == 0:
                cnt += 1
                tmp //= div
            arr.append([div, cnt])

    if tmp != 1:
        arr.append([tmp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr

if __name__ == '__main__':
    A, B = map(int, input().split())
    gcd = math.gcd(A, B)
    if gcd == 1:
        print(1)
        exit()
    facts = factorization(gcd)
    print(len(facts) + 1)


### FIXED CODE ###

import math
import fractions
gcd = math.gcd if hasattr(math, "gcd") else fractions.gcd

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

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

g = gcd(A, B)

print(len(set(factorize(g)))+1)