Harryxun/stf_run huggingface dataset:
H, W = map(int, input().split())
s=[]
for row in range(H):
    s.append(input())
#print(s)



waiting=[]
dx=[1,0,-1,0]
dy=[0,1,0,-1]
def func(xy):
    x, y = xy
    for i in range(4):
        if 0<=y+dy[i]<H and 0<=x+dx[i]<W:
            if walker[y+dy[i]][x+dx[i]] == None and s[y+dy[i]][x+dx[i]]=='.':
                walker[y + dy[i]][x + dx[i]]=walker[y][x]+1
                waiting.append((x+dx[i], y+dy[i]))
    if waiting:
        func(waiting.pop(0))
    else:
        return None

walker=[]
for row in range(H):
    walker.append([None]*W)
#print(walker)
walker[0][0]=0
func((0,0))
#print(walker)
minimum=walker[H-1][W-1]

white_count=0
for row in range(H):
    white_count += s[row].count('.')
#print(white_count)
print(white_count-minimum-1)



### FIXED CODE ###

import sys
sys.setrecursionlimit(5000)

H, W = map(int, input().split())
s=[]
for row in range(H):
    s.append(input())
#print(s)



waiting=[]
dx=[1,0,-1,0]
dy=[0,1,0,-1]
def func(xy):
    x, y = xy
    for i in range(4):
        if 0<=y+dy[i]<H and 0<=x+dx[i]<W:
            if walker[y+dy[i]][x+dx[i]] == None and s[y+dy[i]][x+dx[i]]=='.':
                walker[y + dy[i]][x + dx[i]]=walker[y][x]+1
                waiting.append((x+dx[i], y+dy[i]))
    if waiting:
        func(waiting.pop(0))
    else:
        return None

walker=[]
for row in range(H):
    walker.append([None]*W)
#print(walker)
walker[0][0]=0
func((0,0))
#print(walker)
if walker[H-1][W-1] != None:
    minimum=walker[H-1][W-1]

    white_count=0
    for row in range(H):
        white_count += s[row].count('.')
    #print(white_count)
    print(white_count-minimum-1)
else:
    print(-1)
import numpy as np
import sys
X = int(input())
if X==1:
    print('1')
    sys.exit()
maxnum = 0
for i in range(2,int(np.sqrt(X))+1):
    num = i
    while num <= X:
        num *= i
        if num/i >maxnum:
            maxnum = num/i
print(int(maxnum))

### FIXED CODE ###

a,b,c,d = [int(i) for i in input().split()]
if abs(b-a)<=d and abs(c-b)<=d:
    print('Yes')
elif abs(c-a)<=d:
    print('Yes')
else:
    print('No')
def main():
    A,B = map(str,input().split())
    A = int(A)
    B = B.replace(',','')
    B = int(B)
    C = A*B
    print(C//100)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    A,B = map(str,input().split())
    A = int(A)
    B = B.replace('.','')
    B = int(B)
    C = A*B
    print(C//100)
    
if __name__ == '__main__':
    main()
# 入力
x, a, b = map(int, input().split())

# 処理
answer = (x-a) % b

# 出力
print(answer)

### FIXED CODE ###

X = int(input())
A = int(input())
B = int(input())

print((X - A) % B)
from itertools import accumulate as ac
o=[]
f=lambda l,r,v:lambda x:v if l<=x<=r else v+(l-x) if 0<=x<=l else v+(x-r)
v=lambda s:min(map(lambda x:x(s),o))

o.extend([f(0,0,0)])
n=int(input())
*a,=map(int,input().split())
*b,=map(int,input().split())
*c,=ac([0]+a)

for (i,(t,v)) in enumerate(zip(a,b)):
  o.extend([f(c[i],c[i+1],v)])
o.extend([f(c[-1],c[-1],0)])

S=0
for i in range(2*c[-1]):
  S+=0.25*(v(0.5*i)+v(0.5*(i+1)))
print(S)

### FIXED CODE ###

from itertools import accumulate as ac
o=[]
f=lambda l,r,v:lambda x:v if l<=x<=r else v+(l-x) if 0<=x<=l else v+(x-r)

o.extend([f(0,0,0)])
n=int(input())
*a,=map(int,input().split())
*b,=map(int,input().split())
*c,=ac([0]+a)

for (i,(t,v)) in enumerate(zip(a,b)):
  o.extend([f(c[i],c[i+1],v)])
o.extend([f(c[-1],c[-1],0)])
v=lambda s:min(map(lambda x:x(0.5*s),o))

S=0
for i in range(2*c[-1]):
  S+=0.25*(v(i)+v(i+1))
print(S)
a, b, k = map(int, input().split())
da = []
db = []
dc = []
for i in range(1,a+1):
    if a%i == 0:
    	da.append(i)

for j in range(1, b+1):
    if b%j == 0:
    	db.append(j)

for k in da:
    if k in db:
    	dc.append(k)

dc.sort(reverse = True)
print(dc[k-1])


### FIXED CODE ###

a, b, k = map(int, input().split())
da = []
db = []
dc = []
for i in range(1,a+1):
    if a%i == 0:
    	da.append(i)

for j in range(1, b+1):
    if b%j == 0:
    	db.append(j)

for l in da:
    if l in db:
    	dc.append(l)

dc.sort(reverse = True)
print(dc[k-1])
from math import factorial
n = int(input())
ans_list = []
num_list = []
for i in range(n):
    s = list(input())
    s.sort()
    ans_list.append("".join(s))
ans_list.sort()
count = 1
for i in range(n-1):
    if ans_list[i] == ans_list[i+1]:
        count += 1
    else:
        num_list.append(count)
        count = 1
num_list.append(count)
ans = 0
for i in range(len(num_list)):
    if num_list[i] != 1:
        ans += factorial(num_list[i]) / factorial(2) / factorial(num_list[i]-2)
print(int(ans))


### FIXED CODE ###

from math import factorial
n = int(input())
ans_list = []
num_list = []
for i in range(n):
    s = list(input())
    s.sort()
    ans_list.append("".join(s))
ans_list.sort()
count = 1
for i in range(n-1):
    if ans_list[i] == ans_list[i+1]:
        count += 1
    else:
        num_list.append(count)
        count = 1
num_list.append(count)
ans = 0
for i in range(len(num_list)):
    if num_list[i] != 1:
        ans += factorial(num_list[i]) // factorial(2) // factorial(num_list[i]-2)
print(ans)
a = input()

b = ((a-a/2)/a)

print(b)

### FIXED CODE ###

N = int(input())
 
ans = 0
for i in range(1, N+1):
    if i % 2 == 1:
        ans += 1
print(ans/N)
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
frag = 0
max=a
min=a
if (max<b):
    max=b
if (max<c):
    max=c
if (max<d):
    max=d
if (max<e):
    max=e
if (min>b):
    min=b
if (min>c):
    min=c
if (min>d):
    min=d
if (min>e):
    min=e
z= max-min
if (z>k):
    print(':(')
    else :
        print('Yay!')

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
max=a
min=a
if (max<b):
    max=b
if (max<c):
    max=c
if (max<d):
    max=d
if (max<e):
    max=e
if (min>b):
    min=b
if (min>c):
    min=c
if (min>d):
    min=d
if (min>e):
    min=e
z= max-min
if (z>k):
    print(':(')
else :
    print('Yay!')
import numpy as np
import itertools

H, W, K = map(int, input().split())
c = [list(input().split()) for l in range(H)]

listH = list(range(H))
Hcombi = []
for n in range(H+1):
    a = list(itertools.combinations(listH,n))
    Hcombi.extend(a)

listW = list(range(W))
Wcombi = []
for n in range(W+1):
    a = list(itertools.combinations(listW,n))
    Wcombi.extend(a)

N = 0

for h in Hcombi:
    for w in Wcombi:
        X = np.array(c)
        X[[h],:] = 'n'
        X[:,[w]] = 'n'
        count = np.sum(X == '#')
        if count == K:
            N +=1        
print(str(N))


### FIXED CODE ###

from itertools import product

h, w, k = map(int, input().split())
c = [input() for _ in range(h)]

ans = 0

for row_bit in product(range(2), repeat=h):
    for col_bit in product(range(2), repeat=w):
        cnt = 0
        for row in range(h):
            for col in range(w):
                if (c[row][col] == '#') and ((row_bit[row] == 0) and (col_bit[col] == 0)):
                    cnt += 1   
        if cnt == k:
            ans += 1
print(ans)
import sys
input=sys.stdin.readline
n=int(input())
t=[[] for i in range(n)]
for i in range(1,n):
  a=int(input())
  t[a-1].append(i)
def dfs(v):
  if not t[v]:
    return 0
  l=[dfs(i)+1 for i in t[v]]
  l.sort()
  for i in range(len(t[v])-1):
    l[i+1]=max(l[i+1],l[i]+1)
  return l[-1]
print(dfs(0))

### FIXED CODE ###

import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**7)
n=int(input())
t=[[] for i in range(n)]
for i in range(1,n):
  a=int(input())
  t[a-1].append(i)
def dfs(v):
  if not t[v]:
    return 0
  l=[dfs(i)+1 for i in t[v]]
  l.sort()
  for i in range(len(t[v])-1):
    l[i+1]=max(l[i+1],l[i]+1)
  return l[-1]
print(dfs(0))
n = int(input())
flag = [0] * 101

for i in n:
    d = input()
    flag[d] = 1

for i in 101:
    result += flag[i]

print(result)

### FIXED CODE ###

n = int(input())
flag = [0] * 101

for i in range(n):
    d = int(input())
    flag[d] = 1

result = 0
for i in range(101):
    result += flag[i]

print(result)
def divisors(N):
    U = int(N ** 0.5)
    L = [i for i in range(1, U) if N % i == 0]
    C = [U] if M % U == 0 else []
    R = [N // r for r in reversed(L)]
    return L + C + R

N, M = map(int, input().split())
print(max(d for d in divisors(M) if d * N <= M))


### FIXED CODE ###

def combinations(N):
    comb = [[0] * (N + 1) for _ in range(N + 1)]
    comb[0][0] = 1
    for i in range(1, N + 1):
        for j in range(i + 1):
            comb[i][j] += comb[i - 1][j]
            if j > 0:
                comb[i][j] += comb[i - 1][j - 1]
    return comb


nCk = combinations(60)

N, A, B, *V = map(int, open(0).read().split())

V.sort(reverse=True)

num = V.count(V[A - 1])

ans = 0
if V[0] == V[A - 1]:
    for i in range(A, B + 1):
        ans += nCk[num][i]
else:
    a = V[:A].count(V[A - 1])
    ans = nCk[num][a]

ave = sum(V[:A]) / A

print("{:.9f}".format(ave))
print(ans)
a, b, k = list(map(int,input().strip().split(' ')))

if a > k:
    a1 = a - k
    b1 = b

elif b > k - a:
    a1 = 0
    b1 = max(b -(k - a),0)
    
print(a1, b1)

### FIXED CODE ###

a, b, k = list(map(int,input().strip().split(' ')))

if a > k:
    a1 = a - k
    b1 = b

else:
    a1 = 0
    b1 = max(b -(k - a),0)
    
print(a1, b1)
S= int(input())
A=S.count('+')
B=S.count('-')*(-1)
print(A+B)

### FIXED CODE ###

S= input()
A=S.count('+')
B=S.count('-')
print(A-B)
a_list = list(input())
b_list = list(input())
c_list = list(input())

a_turn = True
b_turn = False
c_turn = False

max_battle = len(a_list) + len(b_list) + len(c_list)

for i in range(max_battle):
    if(a_turn):
        a_list.pop(0)
        if(len(a_list) == 0):
            print("A")
            exit() 
        else:
            if(a_list[0] == 'b'):
                a_turn = False
                b_turn = True 
            elif(a_list[0] == 'c'):
                a_turn = False
                c_turn = True  
    elif(b_turn):
        a_list.pop(0)
        if(len(b_list) == 0):
            print("B")
            exit() 
        else:
            if(b_list[0] == 'a'):
                b_turn = False
                a_turn = True 
            elif(b_list[0] == 'c'):
                b_turn = False
                c_turn = True  
    elif(c_turn):
        c_list.pop(0)
        if(len(c_list) == 0):
            print("C")
            exit() 
        else:
            if(c_list[0] == 'a'):
                c_turn = False
                a_turn = True 
            elif(a_list[0] == 'b'):
                c_turn = False
                b_turn = True  


### FIXED CODE ###

# 入力
SA=list(input())
SB=list(input())
SC=list(input())

# 次に捨てる人（初期値は'A')
x='a'

while True:
  if x=='a':
    # リストの要素が0ならば終了する
    if len(SA)==0:
      print('A')
      exit()

    # 先頭要素を除去してxに代入
    x=SA[0]
    SA.remove(x)
  elif x=='b':
    # リストの要素が0ならば終了する
    if len(SB)==0:
      print('B')
      exit()

    # 先頭要素を除去してxに代入
    x=SB[0]
    SB.remove(x)
  else:
    # リストの要素が0ならば終了する
    if len(SC)==0:
      print('C')
      exit()

    # 先頭要素を除去してxに代入
    x=SC[0]
    SC.remove(x)
from decimal import Decimal
import math 
X = int(input())
yen = 100
n = 1
while yen < X:
    yen = decimal(math.floor(yen*1.01*n))
    if X <= yen:
        print(n)
    n = n + 1

### FIXED CODE ###

import math 
X = int(input())
yen = 100
n = 0
while yen < X:
    n = n + 1
    yen = math.floor(yen*1.01)
    if X <= yen:
        print(n)
n = int(input())
a = [list(map(int, input().split())) for _ in range(n)]
mod = 10 ** 9 + 7

dp = [0] * (1 << n)
dp[0] = 1

bitcount = [0]
for _ in range(n):
    bitcount += [i+1 for i in bitcount]

# 配るDP
for bit in range((1 << n) - 1):
    i = bitcount(bit)
    for j in range(n):
        if a[i][j] and ((bit >> j) & 1 ^ 1):
            newbit = bit | (1 << j)
            dp[newbit] += dp[bit]
            dp[newbit] %= mod
print(dp[(1 << n) - 1])


### FIXED CODE ###

mod = 10**9+7
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
dp = [0]*(1 << n)
dp[0] = 1
for i in range(1, 1 << n):
    k = bin(i).count("1")
    for j in range(n):
        if i >> j & 1 and a[k-1][j]:
            dp[i] += dp[i ^ (1 << j)]
    dp[i] %= mod
print(dp[(1 << n)-1])
import sys
input = sys.stdin.readline

import numpy as np

N = int(input())

dp = np.zeros((N+1, 3), dtype=int)
arr = np.zeros((N, 3), dtype=int)
for i in range(N):
  arr[i] = list(map(int, input().split()))

# dp roop
for i in range(N):
  for j in range(3):
    for k in range(3):
      if j==k:
        continue
      dp[i+1, k] = np.maximum(dp[i+1, k], dp[i, j] + arr[i, k])
print(max(dp[N]))import sys
input = sys.stdin.readline

import numpy as np

N = int(input())

dp = np.zeros((N+1, 3), dtype=int)
arr = np.zeros((N, 3), dtype=int)
for i in range(N):
  arr[i] = list(map(int, input().split()))

# dp roop
for i in range(N):
  for j in range(3):
    for k in range(3):
      if j==k:
        continue
      dp[i+1, k] = np.maximum(dp[i+1, k], dp[i, j] + arr[i, k])
print(max(dp[N]))

### FIXED CODE ###

import sys
input = sys.stdin.readline

N = int(input())
dp = [[0]*3 for i in range(N+1)]
arr = [list(map(int, input().split())) for i in range(N)]

# dp roop
for i in range(N):
  for j in range(3):
    for k in range(3):
      if j==k:
        continue
      dp[i+1][k] = max(dp[i+1][k], dp[i][j] + arr[i][k])
print(max(dp[N]))
n = int(input())
a = list(map(int,input().split()))

x=0
y=0
a.sort()
i=len(a)
while (i>1):
  if a[i-1]==a[i]:
    x=y
    y=a[i]
    i-=2
  else:
    i+=1
  if y>0:
    break

print(x*y)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))

x=0
y=0
a.sort()
i=1
while (i<len(a)):
  if a[i-1]==a[i]:
    x=y
    y=a[i]
    i+=2
  else:
    i+=1

print(x*y)
[N,L] = [int(x) for x in input().split()]
A = {}
ANS = {}
count = 0
for i,x in enumerate(input().split()):
    i = int(i)
    x = int(x)
    if x in A : A[x] += [i]
    else : A[x] = [i]
for i in sorted(A) :
    for j in A[i] :
        for k in range(L) :
            if j + k not in ANS :
                ANS[j+k] = i
                count += 1
    if count >= N : break
for i in range(L-1,N-1) : print(ANS[i], end=" ")
print(ANS[N-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
n = int(input())

res = "No"
for cake in range(0, int(n/4) + 1):
    for dornut in range(0, int(n/7) + 1):
        if 4 * cake + 7 * dornut == n:
            res = "Yes"
            break
    else:
        continue
    break

print(res)

### FIXED CODE ###

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

print(int(N % K != 0))
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t1=t[0]
for i in range(1,n):
    t2=t[i]
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))


### FIXED CODE ###

import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
x=t[0]
ans=t[0]
for i in range(1,n):
    g=frac.gcd(x,t[i])
    ans=x*t[i]//g
    x=ans
print(int(ans))
r, g, b = map(str, input().split())
rgb = r + g + b
if rgb % == 0:
	print('YES')
else:
	print('NO')

### FIXED CODE ###

c = input().split()
c = int(''.join(c))
if c % 4 == 0:
	print('YES')
else:
	print('NO')
n, k = input().split()
p = list(map(int, input().split()))

n, k = int(n), int(k)

s = []
a = 0
ans = 0

for i in range(n):
    c = 0
    a += p[i]
    s.append(a)
    
    if i <= 2:
        continue
    else:
        c = a - s[i - k]
        c += k
        if c > ans:
            ans = c

print(ans / 2)


### FIXED CODE ###

N,K = map(int,input().split())
Data  = map(int,input().split())
Data2 = [0]*N
for idx,data in enumerate(Data):
    e = data * (data+1) / 2 / data
    Data2[idx] = e
#print(Data2)
sum1 = 0
for i in range(K):
    sum1 += Data2[i]
ans = sum1
for i in range(0,N-K):
    sum1 -= Data2[i]
    sum1 += Data2[i+K]
    if ans < sum1:
        ans = sum1
print(ans)
argN,argM = list(map(int,input().split()))
aryA = list(map(int,input().split()))
wkA = aryA[:]
wkA.sort()
#print(wkA)
for i in range(argM):
  argB,argC = list(map(int,input().split()))

  if wkA[argB - 1] < argC:
    wkA[0:argB] = [argC] * argB
  else:
    #二分探索
    ans = 0
    wkB = argB // 2
    maxB = argB
    minB = 1
    while (ans == 0 and maxB == minB):
      if wkA[wkB - 1] < argC:
        if wkA[wkB] >= argC:
          ans = wkB
        else:
          minB = wkB
      else:
        if wkA[wkB - 2] < argC:
          ans = wkB - 1
        else:
          maxB = wkB
      wkB = (maxB + minB) // 2
    if ans > 0:
      wkA[0:ans] = [argC] * ans
  wkA.sort()
  #print(wkA)

#print(wkA)
print(sum(wkA))



### FIXED CODE ###

argN,argM = list(map(int,input().split()))
aryA = list(map(int,input().split()))
aryCB = [] 
for i in range(argM):
  aryBC = list(map(int,input().split()))
  #print(aryBC)
  aryBC.reverse()
  aryCB.append(aryBC[:])
#print(aryCB)
aryCB.sort(reverse=True)
#print(aryCB)

aryD = []
for i in range(len(aryCB)):
  if len(aryD) + aryCB[i][1] < argN:
    aryD += [aryCB[i][0]] * aryCB[i][1]
  elif len(aryD) < argN:
    wk = argN - len(aryD)
    aryD += [aryCB[i][0]] * wk

wkA = aryA[:] + aryD[:]
#print(wkA)
wkA.sort(reverse=True)
print(sum(wkA[:len(aryA)]))
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

### FIXED CODE ###

line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)
a,b=map(int,input().split())
j=0
while b>=2**j:
    j+=1
k=1
l=[0 for i in range(j)]
bia=[0 for i in range(j)]
A=a
i=0
while A>2**(k-1):
    l[i]=A%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bia[i]=0
    else:
        if m%2==1:
            bia[i]=1
        else:
            bia[i]=0
    k+=1
    i+=1
if (A//2)%2==0:
    bia[0]=0
else:
    bia[0]=1
k=1
l=[0 for i in range(j)]
bib=[0 for i in range(j)]
B=b+1
i=0
while B>2**(k-1):
    l[i]=B%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bib[i]=0
    else:
        if m%2==1:
            bib[i]=1
        else:
            bib[i]=0
    k+=1
    i+=1
if (B//2)%2==0:
    bib[0]=0
else:
    bib[0]=1
ans=0
for i in range(j):
    if bia[i]==bib[i]:
        ans=ans
    else:
        ans+=2**i
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
j=0
while b>=2**j:
    j+=1
if b==0:
    j=1
k=1
l=[0 for i in range(j)]
bia=[0 for i in range(j)]
A=a
i=0
while A>2**(k-1):
    l[i]=A%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bia[i]=0
    else:
        if m%2==1:
            bia[i]=1
        else:
            bia[i]=0
    k+=1
    i+=1
if (A//2)%2==0:
    bia[0]=0
else:
    bia[0]=1
k=1
l=[0 for i in range(j)]
bib=[0 for i in range(j)]
B=b+1
i=0
while B>2**(k-1):
    l[i]=B%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bib[i]=0
    else:
        if m%2==1:
            bib[i]=1
        else:
            bib[i]=0
    k+=1
    i+=1
if (B//2)%2==0:
    bib[0]=0
else:
    bib[0]=1
ans=0
for i in range(j):
    if bia[i]==bib[i]:
        ans=ans
    else:
        ans+=2**i
print(ans)
S, T = input().split()

if S == T[0:-1]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = input()
T = input()

if S == T[0:-1]:
    print('Yes')
else:
    print('No')
import math
from functools import reduce


N, X  = (int(i) for i in input().split())
x = (int(i) for i in input().split())
x = list(x)
x.append(X)
#print(x)
x = sorted(x)

ans = x[1]-x[0]
for i in range(2, N+1):
    ans = math.gcd(x[i]-x[i-1],ans)

print(ans)

### FIXED CODE ###

def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

N, X  = (int(i) for i in input().split())
x = (int(i) for i in input().split())
x = list(x)
x.append(X)
#print(x)
x = sorted(x)

ans = x[1]-x[0]
for i in range(2, N+1):
    ans = gcd(x[i]-x[i-1],ans)

print(ans)
c=input()
if "A"<=c&&c<="Z":
  print("A")
else:
  print("a")

### FIXED CODE ###

c=input()
if "A" <= c <= "Z":
  print("A")
else:
  print("a")
broken_step = []

line = [int(s) for s in input().split()]

N, M = line[0], line[1]

for i in range(M):
    step_num = int(input().split()[0])-1
    broken_step.append(step_num)
    
    
dp = list(range(N))
if 0 in broken_step and 1 not in broken_step:
    dp[0] = 0
    dp[1] = 1
elif 0 not in broken_step and 1 not in broken_step:
    dp[0] = 1
    dp[1] = 2
elif 0 in broken_step and 1 in broken_step:
    dp[0] = 0
    dp[1] = 0
else:
    dp[0] = 1
    dp[1] = 0
    

for i in range(N-2):
    dp[i+2] = dp[i]+dp[i+1] if i+2 not in broken_step else 0
    
print(dp[N-1]%1000000007)

### FIXED CODE ###

MOD = (10**9 + 7)

     
line = [int(s) for s in input().split()]
     
N, M = line[0], line[1]
     
b = [0]*(N+1)
for i in range(M):
    step_num = int(input().split()[0])
    b[step_num] = 1
        
        
dp = [0]*(N+1)
dp[0] = 1
if b[1] == 1:
    dp[1] = 0
else:
    dp[1] = 1
     
for i in range(2, N+1):
    if b[i] == 1:
        dp[i] = 0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%MOD
print(dp[N])
n = int(input())
a = list(map(int,input().split()))
a.sort()

#Aiは、Ai以外の任意の(すべての)Ajで割り切れない
unans = 0
for i in a:
  count = 0
  for j in a:
    if i % j == 0:
      count += 1
    if count >= 2:
      unans += 1
      break
   
print(n - unans)

### FIXED CODE ###

x = list(map(int, input().split()))

for i in range(len(x)):
  if x[i] == 0:
    print(i + 1)
    exit()
n = int(input())

ans = 0
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        m = n // i - 1
        if n // m == n % m:
            ans += m

print(ans)


### FIXED CODE ###

n = int(input())

ans = 0
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        m = n // i - 1
        if m != 0 and n // m == n % m:
            ans += m

print(ans)
n, k = map(int, input().split())
pos = [int(i)-1 for i in input().split()]
c = list(map(int, input().split()))
ret = - 10**18
for i in range(n):
    nowsum = [0]
    nxtpos = pos[i]
    while nxtpos != i:
        nowsum.append(nowsum[-1]+c[nxtpos])
        nxtpos = pos[nxtpos]
    nowsum.append(nowsum[-1]+c[nxtpos])
    nowsum = nowsum[1:]
    if k<len(nowsum):
        ret = max(ret, max(nowsum[:k]))
    else:
        if nowsum[-1]<0:
            ret = max(ret, max(nowsum))
        else:
            ret = max(ret, nowsum[-1]*(k//len(nowsum)-1)+max(max(nowsum), nowsum[-1]+max(nowsum[:k%len(nowsum)])))
print(ret)

### FIXED CODE ###

#!/usr/bin python3
# -*- coding: utf-8 -*-

n, k = map(int, input().split())
p = [int(i)-1 for i in input().split()]
c = list(map(int, input().split()))

ret = - 10 ** 18
for s in range(n):
    nxt = p[s]
    S = [c[nxt]]
    while nxt != s:
        nxt = p[nxt]
        S.append(S[-1]+c[nxt])

    if k<=len(S):
        pt = max(S[:k])
    else:
        if S[-1] <= 0:
            pt = max(S)
        else:
            pt = max(S)
            if k%len(S)!=0:
                pt = max(pt, S[-1]+max(S[:k%len(S)]))
            pt += S[-1]*(k//len(S)-1)
    ret = max(ret, pt)
print(ret)
n=int(input())
ans=inf
for i in range(n):
    ans=min(ans,sum(list(n-i))+sum(list(i)))
print(ans)

### FIXED CODE ###

from numpy import inf
n=int(input())
ans=inf
for i in range(n-1):
    ans=min(ans,sum(list(map(int, list(str(n-i-1)))))+sum(list(map(int, list(str(i+1))))))
print(ans)
S = input()
print(sum([a!=b for a,b in zip(S[:-1],S[1:])])

### FIXED CODE ###

S = input()
print(sum([a!=b for a,b in zip(S[:-1],S[1:])]))
A, B, C = map(int, input())

if A + B >= C:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if A + B >= C:
    print('Yes')
else:
    print('No')