Harryxun/stf_run huggingface dataset:
list1 = [0,0]
S=""

a1 = S[0]
a2 = "NUM"

if S[1] == a1:
    list1[0]=2
else:
    a2 = S[1]

if S[2]==a1:
    list1[0]=2
else:
    if S[1]==a1:
        a2 =S[2]
    else:
        if S[2]==a2:
            list1[1]=2
        else:
            pass

if S[3]==a1:
    list1[0]=2
else:
    if S[2]==a1:
        a2 = S[3]
    else:
        if S[3]==a2:
            list1[1]=2
        else:
            pass

if list1[1]==2 and list1[0]==2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

list1 = [0,0]
S=input()

a1 = S[0]
a2 = "NUM"

if S[1] == a1:
    list1[0]=2
else:
    a2 = S[1]

if S[2]==a1:
    list1[0]=2
else:
    if S[1]==a1:
        a2 =S[2]
    else:
        if S[2]==a2:
            list1[1]=2
        else:
            pass

if S[3]==a1:
    list1[0]=2
else:
    if S[2]==a1 and S[1] == a1:
        a2 = S[3]
    else:
        if S[3]==a2:
            list1[1]=2
        else:
            pass
        
if list1[1]==2 and list1[0]==2:
    print("Yes")
else:
    print("No")
import sys
N, Q = [int(i) for i in input().split()]
tree = {i:[] for i in range(1,N+1)}
cost_ls = {i:0 for i in range(1,N+1)}
for i in range(N-1):
    a, b = [int(j) for j in sys.stdin.readline().split()]
    tree[a].append(b)
    tree[b].append(a)

yet = set()
def plus(node, _from):
    yet.add(node)
    #cost_ls[node] += num
    if len(tree[node]) > 0:
        for child in tree[node]:
            if child in yet:
                continue
            cost_ls[child] += cost_ls[node]
            plus(child, node)

for i in range(Q):
    p, x = [int(j) for j in sys.stdin.readline().split()]
    cost_ls[p] += x

plus(1, 0)

print(" ".join([str(cost) for cost in cost_ls.values()]))

### FIXED CODE ###

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)

N, Q = map(int, input().split())
V = {i: [] for i in range(1, N + 1)}
for _ in range(N - 1):
    a, b = map(int, input().split())
    V[a].append(b)
    V[b].append(a)

C = {i: 0 for i in range(1, N + 1)}

for _ in range(Q):
    p, x = map(int, input().split())
    C[p] += x


def propagate(u, p):
    for v in V[u]:
        if v == p:
            continue
        C[v] += C[u]
        propagate(v, u)


propagate(1, 0)

print(' '.join(str(C[i]) for i in range(1, N + 1)))
import array
import itertools
from collections import defaultdict, deque


def log(s):
    # print("| " + str(s), file=sys.stderr)
    pass


def output(x):
    print(x, flush=True)


def input_ints():
    return map(int, input().split())


def solve():
    def find_path(p0, p1):
        queue = deque()
        footsteps = dict()

        queue.append((p0, 0))

        while queue:
            p, s = queue.popleft()
            footsteps[p] = s

            if p == p1:
                return s

            for pp in [(p[0] + 1, p[1]), (p[0] - 1, p[1]), (p[0], p[1] + 1), (p[0], p[1] - 1)]:
                if 0 <= pp[0] < width and 0 <= pp[1] < height and field[pp[1]][pp[0]] == '.' and pp not in footsteps:
                    queue.append((pp, s + 1))
                    footsteps[pp] = -1  # placeholder

    height, width = tuple(input_ints())
    field = [input() for _ in range(height)]

    s = find_path((0, 0), (width - 1, height - 1))

    return "".join(field).count(".") - (s + 1)


def main():
    print(solve())


main()


### FIXED CODE ###

import array
import itertools
from collections import defaultdict, deque


def log(s):
    # print("| " + str(s), file=sys.stderr)
    pass


def output(x):
    print(x, flush=True)


def input_ints():
    return map(int, input().split())


def solve():
    def find_path(p0, p1):
        queue = deque()
        footsteps = dict()

        queue.append((p0, 0))

        while queue:
            p, s = queue.popleft()
            footsteps[p] = s

            if p == p1:
                return s

            for pp in [(p[0] + 1, p[1]), (p[0] - 1, p[1]), (p[0], p[1] + 1), (p[0], p[1] - 1)]:
                if 0 <= pp[0] < width and 0 <= pp[1] < height and field[pp[1]][pp[0]] == '.' and pp not in footsteps:
                    queue.append((pp, s + 1))
                    footsteps[pp] = -1  # placeholder

        return -1

    height, width = tuple(input_ints())
    field = [input() for _ in range(height)]

    s = find_path((0, 0), (width - 1, height - 1))

    if s < 0:
        return -1
    else:
        return "".join(field).count(".") - (s + 1)


def main():
    print(solve())


main()
if __name__=="__main__":
  n=int(input())
  print('ACL'*k)

### FIXED CODE ###

if __name__=="__main__":
  k=int(input())
  print('ACL'*k)
N,A,B=map(int, input().split())
S=int(input().split())

for s in S:
  if s == 'c':
    print('No')
    continue
  if s == 'a' and (cntA+cntB) < A+B:
    print('Yes')
    cntA +=1
  elif (s == 'b') and ((cntA+cntB) < A+B) and (cntB < B):
    print('Yes')
    cntB +=1
  else:
    print('No')


### FIXED CODE ###

N,A,B=map(int, input().split())
S=input()
cntA=0
cntB=0
for s in S:
  if s == 'c':
    print('No')
    continue
  if s == 'a' and (cntA+cntB) < A+B:
    print('Yes')
    cntA +=1
  elif (s == 'b') and ((cntA+cntB) < A+B) and (cntB < B):
    print('Yes')
    cntB +=1
  else:
    print('No')
n, a = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]

nx = n * max(max(x), a)
dp = [[[0 for k in range(nx + 1)] for j in range(n + 1)] for i in range(n + 1)]
dp[0][0][0] = 1

for i in range(n):
    for j in range(n):
        for k in range(nx):
            if k + x[j] <= n * a:
                dp[i + 1][j + 1][k + x[i]] += dp[i][j][k]
            dp[i + 1][j][k] += dp[i][j][k]

ans = sum([dp[n][k][k * a] for k in range(1, n + 1)])
print(ans)


### FIXED CODE ###

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

nx = n * max(max(x), a)
y = [xi - a for xi in x]
dp = [[0 for j in range(2 * nx + 1)] for i in range(n + 1)]
dp[0][nx] = 1

for i in range(n):
    for j in range(2 * nx + 1):
        if not 0 <= j - y[i] <= 2 * nx:
            dp[i + 1][j] = dp[i][j]
        elif j - y[i] <= 2 * nx:
            dp[i + 1][j] = dp[i][j] + dp[i][j - y[i]]

print(dp[n][nx] - 1)
N,K = map(int,input().split())
S = []
S[K-1] = S[K-1].lower()
print(S)

### FIXED CODE ###

N,K = map(int,input().split())
S = list(input())
S[K-1] = S[K-1].lower()
print(''.join(S))
R,G = map(int, input().split())

X = ((2*G)-R)

print(X)

### FIXED CODE ###

R = int(input())
G = int(input())

X = ((2*G)-R)

print(X)
n=str(input())

l=len(n)


if n[l-1]=="3":
    print("bon")
elif (n[l-1]==="0" or n[l-1]==="1" or n[l-1]==="6" or n[l-1]==="8"):
    print("pon")

else :
    print("hon")

### FIXED CODE ###

n=str(input())

l=len(n)


if n[l-1]=="3":
    print("bon")
elif (n[l-1]=="0" or n[l-1]=="1" or n[l-1]=="6" or n[l-1]=="8"):
    print("pon")

else :
    print("hon")
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

n,m = map(int,input().split())
a = list(map(int,input().split()))
tmplcm = 1
for i in a:
    tmplcm = lcm(tmplcm,i)


m -= tmplcm//2
ans = m // tmplcm +1
print(max(ans,0))

### FIXED CODE ###

from fractions import gcd
def lcm(a):

    x = a[0]
    for i in range(1, len(a)):
        x = (x * a[i]//2) // gcd(x, a[i]//2)
    return x

def map_all(es):
    return all([e == es[0] for e in es[1:]]) if es else False

n,m = map(int,input().split())
a = list(map(int,input().split()))
tmp = [0] * n
for i in range(n):
    tmpnum = a[i]
    while 1:
        if tmpnum%2:
            break
        else:
            tmpnum/=2
            tmp[i]+=1

if not map_all(tmp):
    print('0')
    exit()
    
tmplcm = lcm(a)


m -= tmplcm//2
ans = m // tmplcm +1

print(max(ans,0))
N, s, t = map(int, input().split())
s -= 1
t -= 1
to = [[] for _ in range(N)]
for i in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

def dfs(dist, v, d=0, p=-1):
    dist[v] = d
    for u in to[v]:
        if u == p:
            continue
        dfs(dist, u, d+1, v)

def calcDist(s):
    dist = [0] * N
    dfs(dist, s)
    return dist

distS = calcDist(s)
distT = calcDist(t)

mx = 0
for i in range(N):
    if distS[i] < distT[i]:
        mx = max(mx, distT[i])
ans = mx - 1
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

N, s, t = map(int, input().split())
s -= 1
t -= 1
to = [[] for _ in range(N)]
for i in range(N-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

def dfs(dist, v, d=0, p=-1):
    dist[v] = d
    for u in to[v]:
        if u == p:
            continue
        dfs(dist, u, d+1, v)

def calcDist(s):
    dist = [0] * N
    dfs(dist, s)
    return dist

distS = calcDist(s)
distT = calcDist(t)

mx = 0
for i in range(N):
    if distS[i] < distT[i]:
        mx = max(mx, distT[i])
ans = mx - 1
print(ans)
n = int(input())

from fractions import Fraction

for i in range(1,3501):
    for j in range(1,3501):
        if (i * j * n) % (4*i*j - n*i - n*j) == 0 and (i * j * n) // (4*i*j - n*i - n*j) > 0:
            print(i,j)
            print((i * j * n) // (4*i*j - n*i - n*j))
            import sys
            sys.exit()

### FIXED CODE ###

n = int(input())

from fractions import Fraction

for i in range(1,3501):
    for j in range(1,3501):
        if 4*i*j - n*i - n*j > 0:
            if (i * j * n) % (4*i*j - n*i - n*j) == 0 and (i * j * n) // (4*i*j - n*i - n*j) > 0:
                print(i,j, (i * j * n) // (4*i*j - n*i - n*j))
                import sys
                sys.exit()
k = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
z = [int(i) for i in input().split()]

x.sort(reverse=True)
y.sort(reverse=True)
z.sort(reverse=True)

for i in len(x)
  for j in len(y)
    for l in len(z)
      if x*y*z =< k[3]:
        SUM.append(x[i]+y[j]+z[l])
      else:
        break

SUM.sort(reverse=True)

for i in range(k[3])
  print(SUM[i])


### FIXED CODE ###

X,Y,Z,K=map(int,input().split())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
C=[int(i) for i in input().split()]
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
SUM=[]
for i in range(X):
  for j in range(Y):
    for k in range(Z):
      if (i+1)*(j+1)*(k+1)<=K:
        SUM.append(A[i]+B[j]+C[k])
      else:
        break
SUM.sort(reverse=True)
for i in range(K):
  print(SUM[i])
N, K = map(int,input().split())
Alist = list(map(int,input().split()))
print(-(-N-1//k-1))

### FIXED CODE ###

N, K = map(int,input().split())
Alist = list(map(int,input().split()))
print(-(-(N-1)//(K-1)))
s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    l=list(map(int,input().split()))
    if n==0 and m==0:
        break

    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)



### FIXED CODE ###


s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    if n==0 and m==0:
        break
    l=list(map(int,input().split()))


    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)
n,m=map(int,input().split())
A=[["."]*n for i in range(n)]
B=[["."]*m for i in range(m)]
for i in range(n):
  A[i]=list(input())
for i in range(m):
  B[i]=list(input())
for i in range(n-m+1):
  for j in range(n-m+1):
    a=0
    for x in range(m):
      for y in range(m):
        if A[i+x][j+y]!=B[x][y]:
          a=1
          break
    if a==0:
      print("Yes")
      exit()
print("No")

### FIXED CODE ###

import itertools
n,m=map(int,input().split())
G=[[0]*n for i in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  G[a-1][b-1]=1
  G[b-1][a-1]=1
S=""
for i in range(1,n):
  S=S+str(i)
ans=0
for x in itertools.permutations(S):
  a=0
  if G[0][int(x[0])]==0:
    a=1
  for i in range(n-2):
    if G[int(x[i])][int(x[i+1])]==0:
      a=1
  if a==0:
    ans=ans+1
print(ans)
N, K = map(int, input().split())
tmp = list(map(int, input().split()))
A = [1]
A.extend(tmp)

# 循環する場所を探す(最大N回)
used = [1, 1]
used.extend([0] * (N-1)) # すでに通った町は1にする
route = [1]
while used[A[route[-1]]] == 0:
    used[A[route[-1]]] = 1
    route.append(A[route[-1]])

if A.index(A[route[-1]]) == 0:
    print(route[K%(len(route))])
else:
    x = A.index(A[route[-1]]) - 1
    y = len(route) - x
    print(route[x + (K-x)%y])


### FIXED CODE ###

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

passed = [-1] * (n+1)
route = []
v = 1
while passed[v] == -1:
    passed[v] = len(route)
    route.append(v)
    v = a[v-1]

c = len(route) - passed[v]
l = passed[v]

if k < l:
    print(route[k])
else:
    k -= l
    k %= c
    print(route[l+k])
a, b = map(int, input())
if a <= 9 and b <= 9:
    ans = a * b
else:
    ans = -1

print(ans)
    

### FIXED CODE ###

a, b = map(int, input().split())
if a <= 9 and b <= 9:
    ans = a * b
else:
    ans = -1

print(ans)
S = list(input())

if S[2] == S[3] and S[4]==S[5]
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = list(input())

if S[2] == S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')
from import math
r = raw_input()
area = r * r * pi
cir = 2 * r *pi
print '%f %f' %(area, cir)

### FIXED CODE ###

import math
r = input()
area = r * r * math.pi * 1.0
cir = 2 * r * math.pi * 1.0
print '%f %f' % (area, cir)
suuretu = [int(x) for x in input().split()]
answer = 0

for i in suuretu:
    answer += calculate(i)


def calculate(int):
    a = 0
    while int % 2 == 0:
        int = int / 2
        a += 1
    
    return a 

print(answer)

### FIXED CODE ###

import math
n = int(input())
a = list(map(int,input().split()))
maxlog = int(math.log2(max(a)))
answer = 0
for _ in range(maxlog):
  a = [aa/2 for aa in a if aa%2==0]
  answer+= len(a)
  if not a:
    break
print(answer)
K = int(input())

res = [(0, 0)]
mm = 0
for i in range(1, 136):
  n = []
  x = i
  while x > 0:
    n.append(str(min(x, 9)))
    x -= 9
  n.reverse()
  x = int(''.join(n))
  
  while x / i < res[-1][0]:
    res = res[:-1]
  res.append((x / i, x))

for i in range(1, K + 1):
  print(res[i][1])


### FIXED CODE ###

K = int(input())
 
res = [(0, 0)]
mm = 0
cands = []
for i in range(1, 1000):
  v = i
  for j in range(16):
    cands.append(v)
    v = 10 * v + 9

cands = list(sorted(set(cands)))

for x in cands:
  i = sum(ord(c) - ord('0') for c in str(x))
  while x / i < res[-1][0]:
    res = res[:-1]
  res.append((x / i, x))
 
for i in range(1, K + 1):
  print(res[i][1])
S = input()
N = len(S)
L = list(S)

# 回文の判定
def judge(s):
    n = len(s)
    half = n//2
    for i in range(half):
        if s[i] != s[n-1-i]:
            return False
    return True

removeX = S.replace("x", "")
n_removex = len(removeX)
if N % 2 == 0:
    center = removeX[n_removex//2-1:n_removex//2+1]
else:
    center = removeX[n_removex//2:n_removex//2+1]
left, right = S.split(center)
left_idx = 0
right_idx = len(right) - 1
ret = 0
while left_idx < len(left) and right_idx > -1:
    if left[left_idx] != right[right_idx]:
        if left[left_idx] == "x":
            right_idx -= 1
            ret += 1
        if right[right_idx] == "x":
            left_idx += 1
            ret += 1
    else:
        left_idx += 1
        right_idx -= 1

ret += len(left) - left_idx
ret += right_idx + 1
if judge(removeX):
    print(ret)
else:
    print(-1)


### FIXED CODE ###

S = input()
N = len(S)
L = list(S)
left_idx = 0
right_idx = N - 1
ret = 0
while left_idx < right_idx:
    l = S[left_idx]
    r = S[right_idx]
    if l == r:
        left_idx += 1
        right_idx -= 1
    elif l == "x":
        ret += 1
        left_idx += 1
    elif r == "x":
        ret += 1
        right_idx -= 1
    else:
        ret = -1
        break

print(ret)
import logging

logging.basicConfig(level=logging.INFO)
logging.info('info')


def main():
    N, M, K = map(int, input().split())
    A_list = list(map(int, input().split()))
    B_list = list(map(int, input().split()))
    logging.info("hello")

    a = [0]
    b = [0]

    for i in range(N):
        a.append(a[i] + A_list[i])

    for i in range(M):
        b.append(b[i] + B_list[i])

    ans = 0
    j = M
    for i in range(N + 1):
        if a[i] > K:
            break
        for j in range(M):
            if b[j] > K - a[i]:
            else:
                ans = max(ans, i + j)
                break
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import logging

logging.basicConfig(level=logging.INFO)
logging.info('info')


def main():
    N, M, K = map(int, input().split())
    A_list = list(map(int, input().split()))
    B_list = list(map(int, input().split()))
    logging.info("hello")

    a = [0]
    b = [0]

    for i in range(N):
        a.append(a[i] + A_list[i])

    for i in range(M):
        b.append(b[i] + B_list[i])

    ans = 0
    j = M
    for i in range(N + 1):
        if a[i] > K:
            break
        while b[j] > K - a[i]:
            j -= 1
        ans = max(ans, i + j)

    print(ans)

if __name__ == "__main__":
    main()
N = int(input())
abc = [list(map(int, input().split())) for i in range(N)]
abc.append([0, 0, 0])

dp = [[-1] * 4 for i in range(N + 1)]


def happy(n, p):
    if n < 0:
        return 0
    if dp[n][p] >= 0:
        return dp[n][p]

    a = 0 if p == 0 else happy(n - 1, 0) + abc[n][0]
    b = 0 if p == 1 else happy(n - 1, 1) + abc[n][1]
    c = 0 if p == 2 else happy(n - 1, 2) + abc[n][2]
    dp[n][p] = max([a, b, c])

    return dp[n][p]


print(happy(N - 1, 3))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)

N = int(input())
abc = [list(map(int, input().split())) for i in range(N)]
abc.append([0, 0, 0])

dp = [[-1] * 4 for i in range(N + 1)]


def happy(n, p):
    if n < 0:
        return 0
    if dp[n][p] >= 0:
        return dp[n][p]

    a = 0 if p == 0 else happy(n - 1, 0) + abc[n][0]
    b = 0 if p == 1 else happy(n - 1, 1) + abc[n][1]
    c = 0 if p == 2 else happy(n - 1, 2) + abc[n][2]
    dp[n][p] = max([a, b, c])

    return dp[n][p]


print(happy(N - 1, 3))
s = input()
 print(s[0]+str(len(s[1:-1]))+s[-1])

### FIXED CODE ###

s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])
N = int(input())
A_s = LI()

total = 0
for a in A_s:
  total+=(1/a)
  
print(1/total)

### FIXED CODE ###

def LI():
  return [int(s) for s in input().split()]

N = int(input())
A_s = LI()
 
total = 0
for a in A_s:
  total+=(1/a)
  
print(1/total)
S=int(input())
x=str(S)
if x[0]==x[1]:
	print('Bad')
elif x[1]==x[2]:
	print('Bad')
elif x[2]==x[3]:
	print('Bad')
else:
	print('Good')


### FIXED CODE ###

S=input()
x=str(S)
if x[0]==x[1]:
	print('Bad')
elif x[1]==x[2]:
	print('Bad')
elif x[2]==x[3]:
	print('Bad')
else:
	print('Good')
d,n=map(int, input().split())
if d == 0 and n == 100:
    print(101)
elif d == 1 and n == 100
    print(10001)
elif d == 2 and n == 100
    print(1000001)
else:
    print(100**d * n)

### FIXED CODE ###

d,n=map(int, input().split())
if d == 0 and n == 100:
    print(101)
elif d == 1 and n == 100:
    print(10100)
elif d == 2 and n == 100:
    print(1010000)
else:
    print(100**d * n)
N=int(input())
s=[(input() i for in range(N))]
for v in ['AC', 'WA', 'TLE','RE']:
  print('{0}x{1}'.format(v,s.count(v)))

### FIXED CODE ###

N=int(input())
s=[input()  for i in range(N)]
for v in ['AC', 'WA', 'TLE','RE']:
  print('{0} x {1}'.format(v,s.count(v)))
c = input()
if c == ('a','i','u','e','o')
	print('vowel')
else :
	print('consonant')

### FIXED CODE ###

c = input()
if c in['a','i','u','e','o']:
	print('vowel')
else:
  	print('consonant')
x,k,d=map(int,input().split())

for i in range(k):
  if abs(x-d)<abs(x+d):
    x-=di
  else:
    x+=d
print(abs(x))

### FIXED CODE ###

x,k,d=map(int,input().split())

x=abs(x)
ans=0
if x>=d*k:
  ans=x-k*d
else:
  e= int(x/d)
  k-=e
  x-=e*d
  if k%2==1:
    x=abs(x-d)
  ans=x

print(ans)
s = input(S)
if s = "SUN":
    print("7")
elif s = "NON":
    print(6)
elif s = "TUE":
    print(5)
elif s = "WED":
    print(4)
elif s = "THU":
    print(3)
elif s = "FRI":
    print(2)
elif s = "SAT":
    print(1)

### FIXED CODE ###

s = input()
if s == "SUN":
    print(7)
elif s == "MON":
    print(6)
elif s == "TUE":
    print(5)
elif s == "WED":
    print(4)
elif s == "THU":
    print(3)
elif s == "FRI":
    print(2)
elif s == "SAT":
    print(1)
from fractions import*
a,b=map(int,input().split())
c=a*b//gcd(a,b)
d=[0]*c
s=input()
t=input()
for i in range(a):
    try:
        d[i*(c//a)]=s[i]
    except:
for i in range(b):
    if d[i*(c//b)]!=t[i]:
        if d[i*(c//b)]==0:
            continue
        else:
            print(-1)
            exit()
    print(-1)
print(c)

### FIXED CODE ###

from fractions import*
a,b=map(int,input().split())
c=gcd(a,b)
d=a*b//gcd(a,b)
s=input()
t=input()
for i in range(c):
    if s[i*(a//c)] != t[i*(b//c)]:
        print(-1)
        exit()
print(d)
a = map(int, input().split())
X, Y = a[0], a[1]
print(X + int(Y / 2))

### FIXED CODE ###

X, Y = map(int, input().split())

print(X + Y // 2)
a,b,c,d,e,k = map(int, input())
if(e-a > k):
    print(":(")
else:
    print("Yay!")

### FIXED CODE ###

a,b,c,d,e,k = map(int, [input() for i in range(6)])
if(e-a > k):
    print(":(")
else:
    print("Yay!")
import bisect
N,Q = list(map(int,input().split(" ")))

hitos = []
ans = [-1] * Q
queries = []
events = set()
for i in range(N):
    S,T,X =list(map(int,input().split(" ")))
    lt = S -X -0.5
    rt = T -X -0.5
    queries.append((lt,-1,X)) #-1 → 挿入クエリ lが時間、-1がクエリの種類、Xが場所
    queries.append((rt,1,X)) # 1 → 削除クエリ


queries.sort(key = lambda x:x[2])

for i in range(Q):
    t = int(input())
    queries.append((t,0,-99)) # 0 → チェッククエリ
queries.sort(key = lambda x:x[0])
for t,kind,x in queries:
    if kind == 0:
        if len(events) > 0:
            print(min(events))
        else:
            print(-1)
    if kind == -1:
        events.add(x)
    if kind == 1:
        events.remove(x)



### FIXED CODE ###

import bisect
import heapq
import sys
N,Q = [int(x) for x in sys.stdin.readline().split()]

hitos = []
ans = [-1] * Q
queries =[]
jump = [-1] * Q



queries = [[int(x) for x in sys.stdin.readline().split()] for i in range(N)]
hitos = [int(sys.stdin.readline()) for i in range(Q)]


# for i in range(N):
    # S,T,X =list(map(int,input().split(" ")))
    # lt = S -X -0.5
    # rt = T -X -0.5
    # queries.append([lt,rt,X]) #-1 → 挿入クエリ lが時間、-1がクエリの種類、Xが場所


queries.sort(key=lambda x:x[2])





for l,r,x in queries:
     lind  = bisect.bisect_left(hitos,l-x - 0.5)
     rind  = bisect.bisect_left(hitos,r -x - 0.5)
     while lind < rind:
         if ans[lind] == -1:
            ans[lind] = x
            jump[lind] = rind
            lind += 1
         else:
             temp = jump[lind]
             jump[lind] = rind
             lind = temp

for i  in ans:
    print(i)
s = input()

x = []
for i in range(len(s) - 2):
    x.append(abs(int(s[i:i+3]) - 753))
    
print(min(x))

### FIXED CODE ###

x = int(input())

if ((x == 7) or (x == 5) or (x ==3)):
    print("YES")
else:
    print("NO")