peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
A, B = map(int, input().split())

if A == 1 and B == 1:
    print('Draw')
elif A == 1 and B != 1:
    print('Alice')
elif B == 1 and A != 1:
    print('Bob')
elif A > B:
    print('Alice')
elif B > A:
    print('Bob')
else:
    print('Draw')
# Judge status: Accepted
# coding: utf-8


def main():
    X = int(input())
    C = X // 100
    print([0, 1][X >= C * 100 and X <= C * 105])


if __name__ == "__main__":
    main()
# Judge status: Accepted
# ABC097 B  Exponential
x = int(input())
ans = 0
 
for i in range(1,33):
    for j in range(2,10):
        t = i**j
        if t <= x:
            ans = max(t,ans)
print(ans)
# Judge status: Wrong Answer
from collections import Counter
s = dict(Counter(input()))
a = [x for x in s.values()]
ans = "NO"
if len(a) == 1 and a[0] == 1: ans = "YES"
elif len(a) == 3 and (a[0] == a[1] >= a[2] or a[0] > a[1] == a[2]): ans = "YES"
print(ans)
# Judge status: Wrong Answer
S=sorted(list(input()))
if S[0]==S[1] and S[2]==S[3]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys
input=sys.stdin.readline
n=int(input())
l=tuple(map(int,input().split()))
ret=[]
ll=[0]*n
ans=0
for i in range(n,0,-1):
    s=l[i-1]
    for j in range(2,n//i+1):
        s-=ll[j*i-1]
        s%=2
    ll[i-1]=s
    ans+=s
    if s:ret.append(i)
print(ans)
if ans:print(*ret,sep=" ")
# Judge status: Accepted
n = int(input())
L = list(map(int, input().split()))
count = 0
for i in range(1,n-1):
  if (L[i-1] < L[i] and L[i] < L[i+1]) or (L[i-1] > L[i] and L[i] > L[i+1]):
    count += 1
print(count)
# Judge status: Wrong Answer
N = int(input()) #入力値
A = sorted(map(int, input().split()), reverse = True)
Bob=0
Alice=0
print(A)
for i in range(0,N):
      if i % 2 == 0: # Bobが偶数なら実行
         Alice=Alice+int(A[i])
      else:
         Bob=Bob+int(A[i])
print(Alice-Bob)
# Judge status: Wrong Answer
N, D = list(map(int, input().split()))
X = []
cnt = 0
dist2 = 0

for i in range(N):
  tmp = list(map(int, input().split()))
  X.append(tmp)

for i in range(N):
  for j in range(i,N):
    for n in range(D):
      dist2 += (X[i][n] - X[j][n])**2
    a = dist2 **0.5
    if a == int(a) and a != 0:
      cnt += 1
      dist2 = 0
print(cnt)
# Judge status: Accepted
X, N = map(int, input().split())
p = list(map(int, input().split()))
ans = 0
for i in range(102):
  if i not in p:
    if abs(i-X)<abs(ans-X):
      ans = i
print(ans)
# Judge status: Wrong Answer
X,Y=map(int, input().split())

print(X+Y/2)
# Judge status: Accepted
import math
x=int(input())
div,mod=divmod(x,11)
alpha=math.ceil(mod/6)
print(div*2+alpha)
# Judge status: Accepted
N=int(input())
if N%1000==0:
	print(0)
else:
	print(1000-N%1000)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    D, T, S = [int(x) for x in input().split()]
    if T * S >= D:
        print("Yes")
    else:
        print("No")

    

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=list(map(int,input().split()))
check=[[] for i in range(n)]
c=0
g=1
tmp=[]
cy=[]
non=[]

while c<n:
    if check[g-1]==[]:
        c+=1
        tmp.append(g)
        check[g - 1].append(c)
        g=a[g-1]
    else:
        cy=tmp[(check[g-1][0]-1):]
        non=tmp[:(check[g-1][0]-1)]
        break
k-=len(non)
k%=len(cy)
print(cy[k])
# Judge status: Accepted
n=int(input())
a=[int(x) for x in input().split()]

for i in range(n-1):
    if a[i]<a[i+1]:
        a[i+1]-=1
    if a[i]>a[i+1]:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
n = set(map(int,input().split()))
print(len(n))
# Judge status: Wrong Answer
n, k = map(int, input().split())
p = 0
for i in range(1, n + 1):
    if i < k:
        count = 1
        while i * count < k:
            count += 1
        p += 0.5 ** count
    else:
        p += 1
print(p/n)
# Judge status: Accepted
def gcd(p, q):
    if p < q:
        p, q = q, p
    while q > 0:
        p, q = q, p%q
    return p

n = int(input())
ans = 1
for i in range(n):
  t = int(input())
  ans = ans*t//gcd(ans, t)
print(ans)
# Judge status: Accepted
#n=int(input())
#n,m=map(int,input().split())
#sl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

s=list(input())
n=len(s)

#最初が0のリスト
goal1=["1" if i%2==0 else "0" for i in range(n)]
count1=0
#最初が1のリスト
goal2=["0" if i%2==0 else "1" for i in range(n)]
count2=0
for i in range(n):
    if goal1[i]!=s[i]:
        count1+=1
    if goal2[i]!=s[i]:
        count2+=1

print(min(count1,count2))
# Judge status: Accepted
c=int(input())
n = list(map(int,input().split()))
x = 0
for i in range(len(n)):
    if n[i]!=i+1:
        x+=1
        
if(x==0 or x==2):print("YES")
else: print("NO")
# Judge status: Accepted
if input()==input()[::-1]:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
N,M = map(int,input().split())
X = sorted(list(map(int,input().split())))
B=[]

#print(X)
for i in range(M-1):
    B.append(X[i+1]-X[i])

B.sort()
#print(B)


print(sum(B[:-(N-1)]))
# Judge status: Accepted
a,b,c=map(int,input().split())
tmpa=0
ampb=0
tmpc=0

if a%2==1 or b%2==1 or c%2==1:
    print(0)
    exit()

for i in range(10**5):
    tmpa=(b+c)/2
    tmpb=(a+c)/2
    tmpc=(b+a)/2
    a=tmpa
    b=tmpb
    c=tmpc
    if a%2==1 or b%2==1 or c%2==1:
        print(i+1)
        exit()
print(-1)
# Judge status: Wrong Answer
a,b,k=map(int,input().split())

ans=[]

for i in range(k):
    if a+i<b-i:
        ans.append(a+i)
        ans.append(b-i)

ans.sort()

for a in ans:
    print(a)
# Judge status: Wrong Answer
n=int(input())
h=list(map(int,input().split()))
ans=0
kari=0
for i in range(n-1):
        if h[i+1]<=h[i]:
            kari+=1
        elif ans<kari:
            ans=kari
            kari=0
        
       
print(max(ans,kari))
# Judge status: Wrong Answer
# https://atcoder.jp/contests/abc101/tasks/arc099_a


import sys
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


N, K = read_ints()
if N == K:
    print(1)
    exit()
A = read_ints()

K -= 1
i = A.index(1)

# 怒りの全探索
ans = 0
for j in range(0, N, K):
    ans += 1

print(ans)
# Judge status: Accepted
N = str(input())
lenN = len(N)

fN =N[0:(lenN - 1)//2]
lN =N[(lenN + 3)//2-1:]
print(("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]*(0,1)[lN == fN]])
# Judge status: Wrong Answer
import math

num = int(input())
print(num * math.pi)
# Judge status: Wrong Answer
h = int(input())
w = int(input())
n = int(input())
h = max(h, w)
print(n // h)
# Judge status: Accepted
n=int(input())
ans=1
while n>=ans**2:
    ans+=1
print((ans-1)**2)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

xor_sum = 0
for a in A:
    xor_sum ^= a

for a in A:
    print(xor_sum^a, end=" ")
# Judge status: Accepted
class gv:
    input = None;
    
def build():
    gv.str = input()

def solve():
    slen = len(gv.str)
    if (slen&1) == 1:
        print("No")
        return
    
    for i in range(0,slen,2):
        if (gv.str[i:i+2] == "hi") :
            pass
        else :
            print("No")
            return
    
    print("Yes")
    
    

build()
solve()
# Judge status: Accepted
S = input()
l = sorted(list(set(S)))

ans = ""
for i in range(len(l)):
  if ord(l[i]) !=  97 + i:
    ans = chr(97+i)
    break
  elif i == 25 and l[i] == "z":
    ans = "None"

if ans != "":
 print(ans)
else:
  print(chr(ord(l[-1])+1))
# Judge status: Wrong Answer
A,B,C,D=map(int,input().split())
print(A,B,C,D)

from math import*
upto_B=B-(B//C+B//D-B//(C*D//gcd(C,D)))
upto_A=A-1-((A-1)//C+(A-1)//D-(A-1)//(C*D//gcd(C,D)))

print(upto_B-upto_A*(A>2))
# Judge status: Accepted
N = int(input())
S = list(input())

count = []
for i in range(N):
    count.append([0,0])

cb = 0
for i in range(N):
    count[i][0] = cb
    if S[i] == "#":
        cb += 1
cw = 0
for i in range(N):
    count[N-i-1][1] = cw
    if S[N-i-1] == ".":
        cw += 1

ans = 10**10
for i in range(N):
    ans = min(ans,sum(count[i]))
print(ans)
# Judge status: Accepted
n=int(input())
str=input()
count=str.count("R")*str.count("G")*str.count("B")
count0=0
for i in range(0,n-2):
    for j in range(i+1,int((n+i-1)/2)+1):
        k=2*j-i
        if str[k]!=str[i] and str[k]!=str[j] and str[i]!=str[j]:
            count0=count0+1
print(count-count0)
# Judge status: Accepted
import itertools
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, q = map(int, readline().split())
s = readline().decode().rstrip()

lis = [0]*n
for i in range(n - 1):
    if s[i] + s[i + 1] == 'AC':
        lis[i+1] = 1

a = list(itertools.accumulate(lis))

for _ in range(q):
    l, r = map(int, readline().split())
    print(a[r-1]-a[l-1])
# Judge status: Accepted
n,m = map(int,input().split())
a = list(map(int,input().split()))
x = sum(a)
ans = n - x
if ans >= 0:
    print(ans)
else :
    print(-1)
# Judge status: Wrong Answer
import math
n = int(input())
ans = float("inf")
for i in range(1,n+1):
  for j in range(i,math.ceil(n**0.5)+3):
    if i*j == n:
      ans = min(ans,i+j-2)
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]
#print(A)
score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1
#print(score)

for i in range(N):
    if K+score[i]-Q >0:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
x, y = map(int, input().split())
group = {
    1:1,
    3:1,
    5:1,
    7:1,
    8:1,
    10:1,
    12:1,
    4:2,
    6:2,
    9:2,
    11:2,
    2:3
}
if group[x] == group[y]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n=int(input())
mod = 10**9+7
ans = 1
for i in range(1,n+1):
  ans*=(i%mod)
  ans%=mod
print(ans)
# Judge status: Wrong Answer
import sys


def solve(inp):
    N = int(inp.readline().strip())
    B = list(map(int, inp.readline().strip().split(' ')))

    A = [0 for i in range(N)]
    A[N - 1] = B[N - 2]
    n = N - 2
    while n >= 0:
        A[n] = min(B[n], B[n - 1])
        n -= 1

    # print(" ".join(map(str, A)))
    return sum(A)


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()
# Judge status: Accepted
N=int(input())
A=sorted(list(map(int,input().split())),reverse=True)
def sameA(List):
  for i in range(len(List)):
    try:
      if List[i]==List[i+1]:
        ans=List[i]
        anslist=A[i+2:]
        return ans,anslist
    except IndexError:
      return False,False
a1,list1=sameA(A)
if not a1==False:
  a2,list2=sameA(list1)
  if not a2==False:
    print(a1*a2)
  else:
    print(0)
else:
  print(0)
# Judge status: Wrong Answer
n, k = map(int, input().split())

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

def kitaiti(num):
    result = (num+1)*num/(num*2)
    return result
r = [kitaiti(p[i]) for i in range(n)]

result = [sum(r[:k])]
for i in range(k,n):
    result.append(result[-1]+p[i]-p[i-k-1])
print(max(result))
# Judge status: Accepted
def main():
    a = set(map(int,input().split()))
    if (len(a)==2):
        print("Yes")
    else:
        print("No")
main()
# Judge status: Accepted
a, b, c=map(int,input().split())
if a==7 and b==5 and c==5:
  print("YES")
elif a==5 and b==7 and c==5:
  print("YES")
elif a==5 and b==5 and c==7:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
import sys
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

for i in range(X+1,Y+1):
  if max(x)<i and min(y)>=i:
    print('No War')
    sys.exit()

print('War')
# Judge status: Accepted
import sys


def input(): return sys.stdin.readline().strip()


def resolve():
    n, m = map(int, input().split())
    cnt = 0
    if 2*n <= m:
        cnt += n
        m -= n * 2
        cnt += m // 4
    else:
        cnt += m // 2
    print(cnt)
resolve()
# Judge status: Accepted
x = int(input())

cnt, q = divmod(x, 11)

cnt *= 2

if 0 < q <= 6:
    cnt += 1
elif q > 6:
    cnt += 2

print(cnt)
# Judge status: Accepted
k = list(map(int, input().split()))
print(k[0] * k[1])
# Judge status: Accepted
S = input()
L = ["A","G","C","T"]

cnt = 0
maxcnt = 0
for i in range(len(S)):
    if S[i] in L:
        cnt += 1
    else:
        if maxcnt < cnt:
            maxcnt = cnt
        cnt = 0
if maxcnt < cnt:
    maxcnt = cnt
print(maxcnt)
# Judge status: Accepted
def main():
    n,m=map(int,input().split())
    l=[tuple(map(int,input().split())) for _ in range(m)]
    py=sorted(l, key=lambda x: (x[0],x[1]))
    d={}
    i = 1
    prev=0
    for p,y in py:
        if prev != p:
            i = 1
            prev = p
        d[(p,y)] = "{:0>6}".format(p)+"{:0>6}".format(i)
        i += 1
    for x in l:
        print(d[x])

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = int(input())
ans = ''
while n!=0:
    r = n%2
    n = (n-r) // (-2)
    ans += str(r)
print(ans[::-1])
# Judge status: Accepted
s = set()
for i in input().split():
    s.add(i)

print(len(s))
# Judge status: Accepted
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

N, M = map(int, input().split())
red = [0] * (N + 1)
white = [1] * (N + 1)
red[1] = 1
white[1] = 0

for _ in range(M):
    x, y = map(int, input().split())
    if red[x]:
        red[y] += 1
    else:
        white[y] += 1
    if white[x]:
        white[x] -= 1
    else:
        red[x] -= 1

print(N-red[1:].count(0))
# Judge status: Wrong Answer
from math import sqrt
from itertools import permutations
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
order = [i for i in range(N)]
s = 0
for a in permutations(order, N):
    for b in range(N-1):
        s += sqrt((xy[a[b]][0]-xy[a[b+1]][0])**2+(xy[a[b]][1]-xy[a[b+1]][1])**2)
print(s / (N*(N-1)))
# Judge status: Accepted
def main():
    n = input()
    for x in n:
        if x == "7":
            print("Yes")
            return
    print("No")

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
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]):
      continue
    else:
      arrs.append(ss[i])
  else:
    if ss[i-1] == ss[i]:
      arrs.append(ss[i: i+2])
    else:
      arrs.append(ss[i])
while '*' in arrs:
  arrs.remove('*')

print(arrs)
print(len(arrs))
# Judge status: Accepted
n = int(input())
l = []
for _ in range(n):
    a,b = map(int,input().split())
    l.append((b,a))
l.sort()
now = 0
for i in l:
    now+=i[1]
    if now>i[0]:
        print('No')
        exit()
print('Yes')
# Judge status: Wrong Answer
def main():
    x, y, z = map(int, input().split())
    print(x,z,y)

if __name__ == "__main__":
    main()
# Judge status: Accepted
import sys
from collections import defaultdict

lines = 1
inp = list()

for _ in range(lines):
    inp.append(sys.stdin.readline().strip())


s = inp[0]
n = len(s)

tmp = defaultdict(int)
tmp[0] = 1

b = 0
d = 1

for i in range(1, n + 1):
    a = int(s[n - i])
    b = ((d * a) + b) % 2019
    tmp[b] += 1
    d = (d * 10) % 2019

result = 0

for v in tmp.values():
    result += int(v * (v - 1) / 2)

print(result)
# Judge status: Wrong Answer
N, K = list(map(int,input().split()))
S = []
if N <= K:
  print(1)
  exit(0)
for i in range(K,N+2):
  S.append(i*N - (i-1)*i + 1)
print(sum(S))
# Judge status: Accepted
n = int(input())
a = []
for i in range(10)[1:]:
    for j in range(10)[1:]:
        if not i * j in a:
            a.append(i * j)
 
if n in a:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
from sys import stdin


def get_result(data):
    N, X, Y = data
    dist_cnt = [0 for i in range(N)]
    for i in range(1, N+1):
        for j in range(i+1, N+1):
            min_dist = min([j-i, abs(X-i) + 1 + abs(Y-j), abs(Y-i) + 1 + abs(X-j)])
            dist_cnt[min_dist] += 1
    for i in range(1, N):
        print(dist_cnt[i])


if __name__ == '__main__':
    data = list(map(int, stdin.readline().rstrip('\n').split(' ')))
    get_result(data)
# Judge status: Accepted
n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
for i in range(n,10*n+1):
    m =list(map(int,str(i)))
    no = 0
    for j in range(len(m)):
        if m[j] in a:
            no = 1
            break
    if no == 0:
        print(i)
        break
# Judge status: Accepted
def main():
    import numpy as np
    import sys
    input = sys.stdin.readline

    n,w = map(int,input().split())
    l = [list(map(int,input().split())) for i in range(n)]

    dp = np.zeros((n+1,w+1),dtype="int64")
    for i in range(n):
        dp[i+1][:l[i][0]] = dp[i][:l[i][0]]
        dp[i+1][l[i][0]:] = np.maximum(dp[i][l[i][0]:],dp[i][:-l[i][0]]+l[i][1])
    print(dp[n][w])

if __name__ == "__main__":
    main()
# Judge status: Accepted
N, K = map(int, input().split())
H = tuple(map(int, input().split()))

table = [0] * N
for i in range(1, N):
    table[i] = min(abs(H[i] - H[j]) + table[j] for j in range(max(0, i - K), i))

print(table[N-1])
# Judge status: Accepted
import collections
color = map(int, input().split())
print(len(collections.Counter(color)))
# Judge status: Wrong Answer
s = input()

count = 0
for i in range(len(s)-1):
    c=0
    if s[i]!='A' and s[i]!='C' and s[i]!='G' and s[i]!='T':
        continue
    c=1
    for j in range(i+1,len(s)):
        if s[j]!='A' and s[j]!='C' and s[j]!='G' and s[j]!='T':
            break
        else:
            c+=1
    count = c if count<c else count
print(count)
# Judge status: Wrong Answer
o=list(input())
print(o)
e=list(input())+[""]
print(e)
for x,y in zip(o,e):print(x+y,end="")
# Judge status: Accepted
W, a, b = map(int, input().split())

A2W = (a, a+W)
B2W = (b, b+W)

if (A2W[0] <= B2W[0] and B2W[0] <= A2W[1]) or (A2W[0] <= B2W[1] and B2W[1] <= A2W[1]):
    print(0)
elif B2W[0] > A2W[1]:
    print(B2W[0]-A2W[1])
else:
    print(A2W[0]-B2W[1])
# Judge status: Accepted
s = input()
a = len(s)
b = 0
for i in range(len(s)):
  if s[i] == "A":
    a = min(a, i)
  if s[i] == "Z":
    b = max(b,i)
res = b-a+1
print(res)
# Judge status: Accepted
import sys
import math
import bisect

def main():
    a, b = map(int, input().split())
    if a == 1:
        a = 14
    if b == 1:
        b = 14
    if a > b:
        print('Alice')
    elif a < b:
        print('Bob')
    else:
        print('Draw')

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N = int(input())
L = [0] * 90
L[0], L[1] = 2, 1
for i in range(2, len(L)):
    L[i] = int(L[i - 1]) + int(L[i - 2])
print(L)
print(int(L[N]))
# Judge status: Wrong Answer
N, K= map(int, input().split(' '))
A = list(map(int, input().split(' ')))
print(A)

def N_score(n):
    Score = 1
    for i in range(n - (K - 1), n + 1):
        Score *= A[i]
    return Score

for i in range(K, N):
    if(N_score(i-1) < N_score(i)):
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
A,B = map(int, input().split())
c = 0
if A>B:
    c = A
    A-=1
else:
    c = B
    B-=1
if A>B:
    c += A
    A-=1
else:
    c += B
    B-=1
print(c)
# Judge status: Wrong Answer
import math
def inv(a,mod=10**9+7):
    return(pow(a,mod-2,mod))

x,y = map(int,input().split())
mod = 10**9+7
reuslt = 0
if (x+y) %3 == 0:

    n = (2*x-y)//3
    m = (2*y-x)//3
    r = min(n,m)
    result = 1
    for i in range(r):
        result = result*(n+m-i)*inv(i+1,mod)%mod
    
else :
    result = 0

print(result)
# Judge status: Accepted
s = input()
for i in range(len(s)):
    if s[i] == 'A':
        head = i
        break
for i in range(len(s)):
    if s[-(1+i)] == 'Z':
        tail = len(s)-i-1
        break
print(tail - head + 1)
# Judge status: Wrong Answer
a, b = map(int, input().split())

print(a % 24 + b)
# Judge status: Wrong Answer
ans = 0
n = int(input())
w = list(map(int,input().split()))
mid = sum(w)//2
ans = 0
for i in w:
    ans += i
    if mid <= ans:
        print(ans-(sum(w)-ans))
        break
# Judge status: Accepted
def main():
    _ = int(input())
    *A, = map(int, input().split())
    A += [0]

    money = 1000
    stock = 0
    for a, b in zip(A, A[1:]):
        money += stock * a
        stock = 0
        if a < b:
            buy, rest = divmod(money, a)
            stock = buy
            money = rest
    print(money)


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())

cum = 0
mx = 0
for i in range(N):
    cum += i + 1
    if cum >= N:
        mx = i + 1
        break

for i in reversed(range(1, mx+1)):
    if N - i >= 0:
        print(i)
        N -= i
# Judge status: Accepted
if len(set(map(int, input().split()))) == 2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,m = map(int,input().split())
if n%2 == 1:
  for i in range(1,m+1):
    print(i,n+1-i)
else:
  c = 0
  for i in range(1,(n//4)+1):
    print(i,n+1-i)
    c += 1
    if c == m:
      exit()
  j = n//2
  while True:
    print(j,n+2-j)
    c += 1
    if c == m:
      exit()
    j -= 1
# Judge status: Accepted
n, m, x=map(int, input().split())
c=[]
a=[]
for i in range(n):
  l=list(map(int, input().split()))
  c.append(l[0])
  a.append(l[1:])
import numpy as np
ab=np.array(a).T

ans=[]
#print(c)
#print(ab)
from itertools import product
s = [0,1]
for i in sorted(list(product(s, repeat=n))):
  for t in ab:
    if sum(np.array(t)*np.array(i))<x:
      break
  else:
    ans.append(sum(np.array(i)*np.array(c)))
    continue
if ans==[]:
  print(-1)
else:
  print(min(ans))
# Judge status: Accepted
n,k=map(int,input().split())
a=input()
ans=0
cnt=0
for i in range(n-1):
  if a[i]==a[i+1]:
    ans+=1
  if a[i]!=a[i+1]:
    cnt+=1
ans=min(n-1,ans+min(cnt,k)*2)
print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 6)
k = int(input())

ansl = []

def dfs(s):
    if len(s) >= 11:
        return
    ansl.append(s)
    if s[-1] != "0":
        dfs(s+str(int(s[-1])-1))
    dfs(s + str(int(s[-1])))
    if s[-1] != "9":
        dfs(s + str(int(s[-1]) + 1))

for i in range(1,10):
    dfs(str(i))
ansl = [int(a) for a in ansl]
ansl = sorted(ansl)
print(ansl[k-1])
# Judge status: Accepted
n=int(input())
a=[int(input()) for _ in range(n)]

a_s=sorted(a)
m1=a_s[-1]
m2=a_s[-2]

for i in range(n):
    if a[i]==m1:
        print(m2)
    else:
        print(m1)
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))
 
a, b = 0, 0
for i in range(N-1):
  if H[i] >= H[i+1]: b += 1
  else: 
    b = 0
  a = max(a, b)
print(a)
# Judge status: Accepted
abx = input().split()
a, b, x = int(abx[0]), int(abx[1]), int(abx[2])
print(int(b//x) - int((a-1)//x))
# Judge status: Wrong Answer
S = input()
ans = "TBD"
if int(S[:4]) <= 2018:
  ans = "Heisei"
elif int(S[:4]) ==2019 and int(S[6:7]) <=4:
  ans = "Heisei"
  
print( ans)
# Judge status: Accepted
def C(n, r, m):
    num, den = 1, 1
    for i in range(1, r + 1):
        num = num * (n - i + 1) % m
        den = den * i % m
    return (num * pow(den, m - 2, m)) % m

x, y = map(int, input().split())
m = (2*x - y) // 3
n = (-x + 2*y) // 3
if (x + y) % 3 != 0 or m < 0 or n < 0:
    print(0)
else:
    print(C(n + m, n, 10**9 + 7))
# Judge status: Wrong Answer
a,b,c,d=[int(i) for i in input().split()]
if (abs(a-b)>=d and abs(b-c)>=d) or abs(a-c)>=d:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
S = sum(A)
P = 10**8
X = 0
for i in range(N):
  X = X + A[i]
  P = min(P,abs(S-X*2))
print(P)
# Judge status: Wrong Answer
N, M = map(int, input().split())
L = list(list(map(int,input().split())) for i in range(M))
l = 0
r = N
for i in range(M):
    l = max(l,L[i][0])
    r = min(r,L[i][1])
print(r-l+1)
# Judge status: Wrong Answer
n=int(input())
s=input()
flag=False
for i in range(n-1,-1,-1):
    if s[i]==")":
        a=i
        flag=True
        break

if flag:
    t=s[:a+1]
    x=t.count("(")
    y=len(t)-x
    if x<y:
        print("("*(y-x)+t+"("*(n-a-1)+")"*(n-a-1))
    else:
        print(t+")"*(x-y)+"("*(n-a-1)+")"*(n-a-1))
else:
    print("("*n+")"*n)
# Judge status: Wrong Answer
A,B,C = list(map(int,input().split(' ')))
[A,B] = [max(A,B),min(A,B)]
if C>=A and C<=B:
	print('Yes')
else:
  	print('No')