Harryxun/stf_run huggingface dataset:
#ABC104C - All Green
import math
def dfs(i,s,c,r):
    global ans
    if i == d:
        if s < g:
            use = max(r)
            n = min(pc[use -1][0], math.ceil((g-s)/(use*100)))
            c += n
            s += n+use*100
        if s >= g:
            ans = min(ans,c)
    
    else:
        dfs(i+1, s, c, r)
        dfs(i+1, s+ pc[i][0]*(1+1)*100+pc[i][1],c+pc[i][0],r-{i+1})
        
d,g = list(map(int,input().split()))
pc = [list(map(int,input().split())) for i in range(d)]

ans = float("inf")

dfs(0,0,0,set(range(1,d+1)))
print(ans)

### FIXED CODE ###

#ABC104C - All Green
import math
def dfs(i,s,c,r):
    global ans
    if i == d:
        if s < g:
            use = max(r)
            n = min(pc[use -1][0], math.ceil((g-s)/(use*100)))
            c += n
            s += n*use*100
        if s >= g:
            ans = min(ans,c)
    
    else:
        dfs(i+1, s, c, r)
        dfs(i+1, s+ pc[i][0]*(i+1)*100+pc[i][1],c+pc[i][0],r-{i+1})
        
d,g = list(map(int,input().split()))
pc = [list(map(int,input().split())) for i in range(d)]

ans = float("inf")

dfs(0,0,0,set(range(1,d+1)))
print(ans)
import sys
read = sys.stdin.buffer.read

import heapq
mod = 10**9+7
n, *clst = map(int, read().split())
if n == 1:
  print(2*clst[0] % mod)
  quit()
heapq.heapify(clst)
import numpy as np
clst=np.sort(clst)
q=np.arange(2**(n-1)+(n-1)*2**(n-2),2**(n-1)-1,-2**(n-2))

res=np.sum(clst*q)
print(2**n*res % mod)


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
mod=10**9+7
n, *clst = map(int, read().split())
if n == 1:
  print(clst[0]*2%mod)
  quit()
clst.sort(reverse=True)
res=sum(i*item for i, item in enumerate(clst,2))
print((4**(n-1)*res)%mod)
N,L = map(int,input().split())
a = []
for i in range(1,N+1):
  a.append(L+i-1)
b = []
for i in a:
  b.append(abs(i))
for i in range(1,N+!):
  if abs(L+i-1) == min(b):
    print(sum(a)-L-i+1)

### FIXED CODE ###

N,L = map(int,input().split())
a = []
for i in range(1,N+1):
  a.append(L+i-1)
b = []
for i in a:
  b.append(abs(i))
for i in range(1,N+1):
  if abs(L+i-1) == min(b):
    print(sum(a)-L-i+1)
print ' '.join(map(str, sorted(map(int, raw_input().split()))[::-1])))

### FIXED CODE ###

print ' '.join(map(str, sorted(map(int, raw_input().split()))[::-1]))
s=input()
t=input()
list=[]
list = t.split()
print(list)
ans=0

def even(i,k):
  for j in range(k+1,len(list)):
    if(int(list[j])%2==0):
      s = i + int(list[j])
      if(power(s)):
        return 1
    else:
      continue
      
  return 0
  
def odd(i,k):
  for j in range(k+1,len(list)):
    if(int(list[j])%2==0):
      continue
    else:
      s = i + int(list[j])
      if(power(s)):
        return 1
      
  return 0
      

def power(s):
  while(True):
    s = int(s / 2)
    if(s==1):
       return 1

    if(s % 2 != 0):
      break      
      return 0

for i in range(len(list)-1):
  if(int(list[i]) % 2 == 0):
    if(even(int(list[i]),i)):
      ans = ans+1
  else:
    if(odd(int(list[i]),i)):
      ans = ans+1

print(ans)

### FIXED CODE ###

s = input()
list = list(s)
count=0
b=0

for i in range(len(list)):
  if(list[i] == "W"):
    count+=b
    continue
  else:
    if(i == len(list)-1):
      break
    b += 1
      
print(count)
n = int(input())
if n == 1 :
    print("Hello World")
if n == 2 :
    a, b = map(int, input().split())
    print(a + b)

### FIXED CODE ###

n = int(input())
if n == 1 :
    print("Hello World")
else :
    a = int(input())
    b = int(input())
    print(a + b)
import heapq as pq
from collections import deque
from itertools import accumulate
N,K = map(int,input().split())
v = list(map(int,input().split()))
acc = [0]+list(accumulate(v,lambda x,y: x+y))
anss = -1
for k in range(K+1):
    for i in range(k+1):
        ans = 0
        ls = deque(v)
        heap = []
        j = k-i
        ans += acc[i]+acc[-1]-acc[-1-j]
        for q in range(i):
            if ls:
                pq.heappush(heap,ls.popleft())
            else:
                break
        for q in range(j):
            if ls:
                pq.heappush(heap,ls.pop())
            else:
                break
        for i in range(K-k):
            if heap:
                x = pq.heappop(heap)
                if x < 0:
                    ans -= x
                else:
                    break
        anss = max(ans,anss)
print(anss)

### FIXED CODE ###

import heapq as pq
from collections import deque
from itertools import accumulate
N,K = map(int,input().split())
v = list(map(int,input().split()))
acc = [0]+list(accumulate(v,lambda x,y: x+y))
anss = -1
M = min(K,N)
for k in range(M+1):
    for i in range(k+1):
        ans = 0
        ls = deque(v)
        heap = []
        j = k-i
        ans += acc[i]+acc[-1]-acc[-1-j]
        for q in range(i):
            if ls:
                pq.heappush(heap,ls.popleft())
            else:
                break
        for q in range(j):
            if ls:
                pq.heappush(heap,ls.pop())
            else:
                break
        for i in range(K-k):
            if heap:
                x = pq.heappop(heap)
                if x < 0:
                    ans -= x
                else:
                    break
        anss = max(ans,anss)
print(anss)
s, w = map(int, input().split())
if s > w:
  print(safe)
else:
  print(unsafe)

### FIXED CODE ###

s, w = map(int, input().split())
if s > w:
  print("safe")
else:
  print("unsafe")
n,m = map(int,input().split())
a = [list(input())for i in range(n)]
for y in range(n-m+1):
    for z in range(n-m):
        count = 0
        for p in range(m):
            if b[p] == a[y+p][z:(z+m)]:
                count += 1
                if count == m:
                    print("Yes")
                    exit()
            else:
                count = 0
    print("No")


### FIXED CODE ###

n,m = map(int,input().split())
a = [list(input())for i in range(n)]
b = [list(input())for i in range(m)]
for y in range(n-m+1):
    for z in range(n-m+1):
        count = 0
        for p in range(m):
            if b[p] == a[y+p][z:(z+m)]:
                count += 1
                if count == m:
                    print("Yes")
                    exit()
            else:
                count = 0
print("No")
#A
#B
#C
if False:
    N=int(input())
    S=[input() for _ in range(N)]
    march=list('MARCH')
    nam=[[] for _ in range(len(march))]
    for s in S:
        if s[0] in march:
            nam[march.index(s[0])].append(s)
    ans=0
    for i in range(5):
        for j in range(i+1,5):
            for k in range(j+1,5):
                ans+=len(nam[i])*len(nam[j])*len(nam[k])
    print(ans)

#D
N=int(input())
ver=[[] for _ in range(N)]
for _ in range(N-1):
    u,v,W=map(int,input().split())
    ver[u-1].append((v-1,W))
    ver[v-1].append((u-1,W))
his=[-1 for _ in range(N)]

def dfs(i,col):
    his[i]=col
    for j,w in ver[i]:
        if his[j]==-1:
            if w%2==0:
                his[j]=col
                dfs(j,col)
            else:
                dfs(j,(col+1)%2)

dfs(0,0)            
print(his)


### FIXED CODE ###

import sys

if sys.getrecursionlimit()<10**7:
    sys.setrecursionlimit(10**7)

N=int(input())
ver=[[] for _ in range(N)]
for _ in range(N-1):
    u,v,W=map(int,input().split())
    ver[u-1].append((v-1,W))
    ver[v-1].append((u-1,W))
his=[-1 for _ in range(N)]

def dfs(i,col):
    his[i]=col
    for j,w in ver[i]:
        if his[j]==-1:
            if w%2==0:
                dfs(j,col)
            else:
                dfs(j,(col+1)%2)

dfs(0,0)            
for i in range(N):
    print(his[i])
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
c = Counter(S)
ans = c.most_common()
ans = [i[0] for i in ans if i[1] == ans[0][1]]
for i in sorted(ans):
    print(i)

### FIXED CODE ###

l =list(map(int, input().split()))
if len(l) == len(set(l)) + 1:
  print("Yes")
else:
  print("No")
n = int(input())
l =[]
inv =[]
s = 0
for i in range(n):
    l.append(int(input()))

for i in l:
    i_inv = 1/i
    s += i_inv
print(1/s)

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
s = 0 
for i in l:
    i_inv = 1/i
    s += i_inv
print(1/s)
print("AB"+["C","D"][len(input()<4)])


### FIXED CODE ###

print("AB"+["D","C"][len(input())<4])
n,k = [int(i) for i in input().split()]
td = [[int(i) for i in input().split()] for _ in range(n)]

###dが大きい順にソート
td.sort(key = lambda x: x[0],reverse=True)
td.sort(key = lambda x: x[1],reverse=True)

###なるべくtの種類を多いなかで、dを最大化する
###まず各tでdが最大のものを1つずつ選ぶ
eated_kind = []
eated_kind_num = 0
eated = []
for t,d in td:
  if t not in eated_kind:
    eated_kind.append(t)
    eated_kind_num += 1
    eated.append([t,d])
    
    ###tがk種類存在したら、残りのtを扱うことはない
    ###またdも最大化されているため、これ以降のtdを使うことはない
    if eated_kind_num == k:
      td = td[:i+1]
      break

not_eated = [i for i in td if i not in eated]

###tがk種類存在しなかったら、k個になるまでtに関係なくdを最大化する
if eated_kind_num < k:
  eated += not_eated[:k-eated_kind_num]
  not_eated = not_eated[k-eated_kind_num:]
  #print(eated)
  eated.sort(key = lambda x: x[1],reverse=True)
  
t_point = eated_kind_num**2
d_point = sum([i[1] for i in eated])
point = t_point + d_point
###種類の寿司でdの最大化をする
for t,d in not_eated:
  eated_last_t, eated_last_d = eated[-1]
  t_point_sub = (eated_kind_num-1)**2 - eated_kind_num**2
  d_point_sub = d - eated_last_d
  eated = eated[:-1]
  point = max(point,point+t_point_sub+d_point_sub)
  eated_kind_num -= 1
  if eated_kind_num == 1:
    break
#print(eated)

print(point)

### FIXED CODE ###

n,k = [int(i) for i in input().split()]
td = [[int(i) for i in input().split()] for _ in range(n)]

###dが大きい順にソート
td.sort(key = lambda x: x[1],reverse=True)

###各tでdが最大のものを格納
fix_eated_d=[]
###各tでdが最大でないものを格納。tの種類を増やす際の削除候補
change_eated_d=[]

eated_t = set()
d_point = 0

###まずdを最大化
for t,d in td[:k]:
  
  ###すでにtが選ばれているなら最大のdではないのでchangeへ
  if t in eated_t:
    change_eated_d.append(d)
    
  ###まだtが選ばれていないなら最大のdだからfixへ
  else:
    fix_eated_d.append(d)
    eated_t.add(t)
    
  d_point += d
  
point = len(eated_t)**2 + d_point

###tの種類を増やす
for t,d in td[k:]:
  ###削除候補がなくなれば終了
  if not change_eated_d:
    break
  
  ###すでにtが選ばれているならskip
  if t in eated_t:
    continue
    
  ###まだtが選ばれていないなら追加、change中dが最小のものを削除
  eated_t.add(t)
  d_point += d - change_eated_d.pop()
  point = max(point, len(eated_t)**2 + d_point)
  
print(point)
n, mod = int(input()), 10 ** 9 + 7
memo = [{} for i in range(n+1)]
def check(l):
    for i in range(4):
        t = list(l)
        if i >= 1:
            t[i-1], t[i] = t[i], t[i-1] # 順序の入れ替え
        if ''.join(t).count('AGC') >= 1:
            return False
    return True

def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == n:
        return 1
    ret = 0
    for c in 'ACGT':
        if check(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % mod
    memo[cur][last3] = ret
    print(memo)
    return ret

print(dfs(0, 'TTT'))


### FIXED CODE ###

n, mod = int(input()), 10 ** 9 + 7
memo = [{} for i in range(n+1)]
def check(l):
    for i in range(4):
        t = list(l)
        if i >= 1:
            t[i-1], t[i] = t[i], t[i-1] # 順序の入れ替え
        if ''.join(t).count('AGC') >= 1:
            return False
    return True

def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == n:
        return 1
    ret = 0
    for c in 'ACGT':
        if check(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % mod
    memo[cur][last3] = ret
    return ret

print(dfs(0, 'TTT'))
import sys
def input():
    return sys.stdin.readline()[:-1]
N,u,v = map(int,input().split(' '))
l = [None]*N
for i in range(N-1):
    l[i] = list(map(int, input().split()))

MAP = {}
for i in range(N):
    if l[i]==None:
        continue
    a,b = l[i]
    if a in MAP:
        MAP[a].append(b)
    else:
        MAP[a] = [b]
    if b in MAP:
        MAP[b].append(a)
    else:
        MAP[b] = [a]

#Tがたどり着くのにかかる手数
t_MAP = [0]*(N+1)
cost = 0

def t_dfs(n,c):
    t_MAP[n] = c
    c += 1
    if n in MAP:
        for j in MAP[n]:
            if t_MAP[j]==0 and j!=u:
                t_dfs(j,c)
t_dfs(u,cost)

a_visited = [False]*(N+1)
break_even = False
pre_tcost = 10**5
ANS = [0]
def a_dfs(n,c,pre_c):
    a_visited[n] = True
    t_cost = t_MAP[n]
    if t_cost>c:
        if t_cost>pre_c:
            return
    ANS[0] = max(c,ANS[0])
    c += 1
    if n in MAP:
        for j in MAP[n]:
            if not a_visited[j]:
                a_dfs(j,c,t_cost-1)
a_visited[v] = True
a_dfs(v,cost,pre_tcost)
print(ANS[0]-1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
def input():
    return sys.stdin.readline()[:-1]
N,u,v = map(int,input().split(' '))
l = [None]*N
for i in range(N-1):
    l[i] = list(map(int, input().split()))

MAP = {}
for i in range(N):
    if l[i]==None:
        continue
    a,b = l[i]
    if a in MAP:
        MAP[a].append(b)
    else:
        MAP[a] = [b]
    if b in MAP:
        MAP[b].append(a)
    else:
        MAP[b] = [a]

#Tがたどり着くのにかかる手数
t_MAP = [0]*(N+1)
cost = 0

def t_dfs(n,c):
    t_MAP[n] = c
    c += 1
    if n in MAP:
        for j in MAP[n]:
            if t_MAP[j]==0 and j!=u:
                t_dfs(j,c)
t_dfs(u,cost)

a_visited = [False]*(N+1)
break_even = False
pre_tcost = 10**5
ANS = [0]
def a_dfs(n,c,pre_c):
    a_visited[n] = True
    t_cost = t_MAP[n]
    if t_cost>c:
        if t_cost>pre_c:
            return
    ANS[0] = max(c,ANS[0])
    c += 1
    if n in MAP:
        for j in MAP[n]:
            if not a_visited[j]:
                a_dfs(j,c,t_cost)
a_visited[v] = True
a_dfs(v,cost,pre_tcost)
print(ANS[0]-1)
X = int(input())
Y = int(input())

print(X + Y/2)

### FIXED CODE ###

x, y = tuple(map(int, input().split()))

print(int(x + y/2))
def main():
    a,b,c = map(int, input().split(" "))

    if 4 * a * b < (c - a - b) * (c - a - b) 2 and (c - a - b) > 0:
        print('Yes')
    else:
        print('No')
main()

### FIXED CODE ###

from decimal import Decimal

def main():
    a,b,c = map(int, input().split(" "))

    if Decimal(a).sqrt() + Decimal(b).sqrt() < Decimal(c).sqrt():
        print('Yes')
    else:
        print('No')
main()
while True:
	a,b = map(int,raw_input().split())
	print len(str(a+b))

### FIXED CODE ###

while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break
K = int(input())
S = input()
if len(S) > K:
    print(s[:k]+'...')
else:
    print(S)

### FIXED CODE ###

K = int(input())
S = input()
if len(S) > K:
    print(S[:K]+'...')
else:
    print(S)
S = input()
K = int(input())
S_list = []
infinity = 50000000000000
S_str = str()
for i in range(len(S)):
    if int(S[i]) != 1:
        S_list.append(S[i])
        break
    else:
        pass
print(S_list[0])

### FIXED CODE ###

S = input()
K = int(input())
flg = False
for i in range(K):
    if S[i] != '1':
        print(S[i])
        flg = False
        break
    else:
        flg = True
if flg:
    print('1')
from functools import reduce
from fractions import gcd
import numpy as np

n = int(input())
As = list(map(int, input().split()))
mod = 10**9 + 7

def lcm_base(x, y):
    return (x * y) // gcd(x, y)
 
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
lcm = lcm_list(As)
As = np.array(As)
b = np.array([lcm]*n)
c = b / As
print(int(round(np.sum(c) % mod)))


### FIXED CODE ###

from functools import reduce
from fractions import gcd

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers)
mod = 10**9 + 7
n = int(input())
As = list(map(int, input().split()))

lcm = lcm_list(As)
b = [lcm//As[i] for i in range(n)]

print(sum(b) % mod)
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]


MOD = 1000000007

dp = [0 for _ in range(N + 1)]

dp[0] = 1



next_ng_index = 0

for index in range(N):
    current = index + 1
    if current == A[next_ng_index]:
        next_ng_index += 1
        if next_ng_index == M:
            next_ng_index = 0
        continue

    pre_stair = current - 1
    dp[current] += dp[pre_stair]

    prepre_stair = current -2
    if prepre_stair >= 0:
        dp[current] += dp[prepre_stair]

    dp[current] %= MOD

print(dp[-1]%MOD)







### FIXED CODE ###

N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
A.append(-1)


MOD = 1000000007

dp = [0 for _ in range(N + 1)]

dp[0] = 1



next_ng_index = 0

for index in range(N):
    current = index + 1
    if current == A[next_ng_index]:
        next_ng_index += 1
        continue

    pre_stair = current - 1
    dp[current] += dp[pre_stair]

    prepre_stair = current -2
    if prepre_stair >= 0:
        dp[current] += dp[prepre_stair]

    dp[current] %= MOD

print(dp[-1]%MOD)
def manhattan(i, j, x, y):
    # (i, j)中央点の座標，(x, y)既知の座標
    return abs(i-x) + abs(j-y)

def main(N, X, Y, H):
    for i in range(101):
        for j in range(101):
            # 既知座標１点を得て，中心座標の高さを決定する
            x, y, h = X[0], Y[0], H[0]
            hmax = h + manhattan(i, j, x, y)
            # 残り既知座標N-1点について，矛盾がないか確かめる
            for k in range(1, N-1):
                x, y, h = X[k], Y[k], H[k]
                if hmax - h != manhattan(i, j, x, y):
                    break
            else:
                return i, j, hmax

N = int(input())
X, Y, H = [], [], []
for _ in range(N):
    x, y, h = map(int, input().split())
    X.append(x)
    Y.append(y)
    H.append(h)
i, j, hmax = main(N, X, Y, H)
print(str(i) + ' ' + str(j) + ' ' + str(hmax))

### FIXED CODE ###

def manhattan(i, j, x, y):
    # (i, j)中央点の座標，(x, y)既知の座標
    return abs(i-x) + abs(j-y)

def main(N, X, Y, H):
    cand = [0, 0, 0]
    for i in range(101):
        for j in range(101):
            # 既知座標１点を得て，中心座標の高さを決定する
            for k in range(N):
                if H[k] != 0:
                    x, y, h = X[k], Y[k], H[k]
                    hmax = h + manhattan(i, j, x, y)
                    break
            # 残り既知座標N-1点について，矛盾がないか確かめる
            for k in range(N):
                x, y, h = X[k], Y[k], H[k]
                if h == 0:
                    if hmax > manhattan(i, j, x, y):
                        break
                else:
                    if hmax - h != manhattan(i, j, x, y):
                        break
            else:
                if cand[2] < hmax:
                    cand = [i, j, hmax]
    return cand

N = int(input())
X, Y, H = [], [], []
for _ in range(N):
    x, y, h = map(int, input().split())
    X.append(x)
    Y.append(y)
    H.append(h)
i, j, hmax = main(N, X, Y, H)
print(str(i) + ' ' + str(j) + ' ' + str(hmax))
while 1:
        a,op,b=map(input().split())
        a=int(a)
        b=int(b)
                
        if op==('+'):
                print(a+b)
        elif op==('-'):
                print(a-b)
        elif op==('*'):
                print(a*b)
        elif op==('/'):
                print(a/b)
        elif op==('?'):
                break




### FIXED CODE ###



while 1:
     s=input()
     if '?' in s: break
     print(int(eval(s)))
H = int(input())

if H%2==1:
  H = H-1

from math import log2
deep = int(log2(H))+1
ans = 0
for d in range(0,deep):
  ans += 2**d

print(ans)

### FIXED CODE ###

H = int(input())

if H==1:
  print(1)
else:
  
  if H%2==1:
    H = H-1

  from math import log2
  deep = int(log2(H))+1
  ans = 0
  for d in range(0,deep):
    ans += 2**d

  print(ans)
N = int(input())
A = [int(_) for _ in input().split()]
 
i = 0
j = 0
x = 0
 
result = 0
 
while i < N or j < N:
    while j < N and x & A[j] == 0:
        x |= A[j]
        j += 1
    result += j - i
    x &= ~A[i]
    i += 1
    
print(result)
N = int(input())
A = [int(_) for _ in input().split()]

i = 0
j = 0
x = 0

result = 0

while i < N or j < N:
    while j < N and x & A[j] == 0:
        x |= A[j]
        j += 1
    result += j - i
    x &= ~A[i]
    i += 1
    
print(result)

### FIXED CODE ###

import sys,collections as cl
Max = sys.maxsize
def l():
	return list(map(int,input().split()))
def m():
	return map(int,input().split())
def s(x):
	a = []
	aa = x[i]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a

n = int(input())

a = l()

ans = 0
l = 0
r = 0
su = 0
for i in range(n):
	while(r < n and (su^a[r]) == (su + a[r])):
		su += a[r]
		r += 1
	ans += r - i
	if r == i:
		r += 1
	else:
		su -= a[i]
print(ans)
n = int(input())
nlis = list(map(int, input().split())) # list()でリスト化、それを変数に代入。

if nlis[-1] == 2 or nlis[-1] == 4 or nlis[-1] == 5 or nlis[-1] == 7 or nlis[-1] == 9:
    print('hon')
elif nlis[-1] == 0 or nlis[-1] == 1 or nlis[-1] == 6 or nlis[-1] == 8:
    print('pon')
else:
    print('bon')


### FIXED CODE ###


str = input()
h = list(str)#文字列をリストに

if(h[-1]=='2' or h[-1]=='4' or h[-1]=='5' or h[-1]=='7' or h[-1]=='9'):
    print('hon')
elif(h[-1]=='0' or h[-1]=='1' or h[-1]=='6' or h[-1]=='8'):
    print('pon')
else:
    print('bon')
a,b,c=map(int,input().split())
if a==b==c:
    print("No")
elif　a==b or b==c:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a,b,c=map(int,input().split())
if a==b==c:
    print("No")
elif a == b or b==c or c==a:
    print("Yes")
else:
    print("No")
n = int(input())
l = []
for i in range(n):
    s, p = input().split()
    l.append((s,int(p),i))
l.sort(key = lambda x:(x[0],x[1]), reverse = True)
for _ in l:
    print(l[2])

### FIXED CODE ###

n = int(input())
l = []
for i in range(n):
    s, p = input().split()
    l.append((s,int(p),i+1))
l.sort(key = lambda x : x[1],reverse=True)
l.sort(key = lambda x : x[0])
for i in range(n):
    print(l[i][2])
from collections import defaultdict

N, Q = map(int, input().split())
adjacent = defaultdict(list)
for i in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    adjacent[a].append(b)
    adjacent[b].append(a)
scores = [0] * N
for i in range(Q):
    p, x = map(int, input().split())
    p -= 1
    scores[p] += x

ans = [0] * N


def dfs(to, fr, score):
    score += scores[to]
    ans[to] = score
    for u in adjacent[to]:
        if u == fr:
            continue
        dfs(u, to, score)


dfs(0, -1, 0)
print(' '.join([str(ans[i]) for i in range(N)]))


### FIXED CODE ###

from collections import defaultdict, deque

N, Q = map(int, input().split())
adjacent = defaultdict(list)
for i in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    adjacent[a].append(b)
    adjacent[b].append(a)
ans = [0] * N
for i in range(Q):
    p, x = map(int, input().split())
    p -= 1
    ans[p] += x

q = deque([(0, -1)])
while len(q) > 0:
    u, p = q.pop()
    for v in adjacent[u]:
        if v == p:
            continue
        ans[v] += ans[u]
        q.appendleft((v, u))
print(' '.join([str(ans[i]) for i in range(N)]))
import sys
import numpy as np

# import os
# path = os.getcwd()
# path = os.path.join(path,"input.txt")
# sys.stdin = open(path)

input = sys.stdin.readline
N,W  = map(int,input().split())
dp = np.zeros((N+1,W+1),dtype=int)
w,v = [],[]
for _ in range(N):
    w_,v_ = map(int,input().split())
    w.append(w_)
    v.append(v_)

for row in range(N):
    dp[row+1,:w[row]] = dp[row,:w[row]]
    dp[row+1,w[row]:] = np.maximum(v[row]+dp[row,-w[row]:],dp[row,w[row]])


print(dp[N,-1])

### FIXED CODE ###

import sys
import numpy as np


input = sys.stdin.readline
N,W  = map(int,input().split())
dp = np.zeros((N+1,W+1),dtype=int)
w,v = [],[]
for _ in range(N):
    w_,v_ = map(int,input().split())
    w.append(w_)
    v.append(v_)

for row in range(N):
    dp[row+1,:w[row]] = dp[row,:w[row]]
    dp[row+1,w[row]:] = np.maximum(dp[row,w[row]:],v[row]+dp[row,:-w[row]])
print(dp[N,-1])