Harryxun/stf_run huggingface dataset:
W, H, x, y, r = [int(i) for i input().split()]
if x < 0 or y < 0:
    print("No")
elif x+r <= W and y+r <= H:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

W, H, x, y, r = [int(i) for i in input().split()]
if x < 0 or y < 0:
    print("No")
elif x+r <= W and y+r <= H:
    print("Yes")
else:
    print("No")
N=int(input())
S=list(map(int,input().split()))
a=[]
for i in range(N-1):
    j=i
    m=0
    while j<N-1 and S[j]>=S[j+1]:
        m+=1
        j+=1
    a.append(m)
print(max(a))

### FIXED CODE ###

N=int(input())
S=list(map(int,input().split()))
a=[]
i=0 #リスト
m=0
while i<N-1:
    if S[i]>=S[i+1]:
        m+=1
        if i<N-3:
            if S[i+1]<S[i+2]:
                a.append(m)
                m=0
    i+=1
a.append(m)
print(max(a))
v, c=list(map(int, input().split()))
n=len(v)
n=len(c)
s=0
for i in range(n):
  if v[i]-c[i]>0:
    s=s+v[i]-c[i]
print(s)

### FIXED CODE ###

n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

s = 0
for i in range(n):
  if v[i] - c[i] >= 0:
    s += v[i] - c[i]
  else:
    continue
print(s)
h, w = map(int, input().split())
arr = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
    arr[i] = list(input())

def isWay(x, y):
    if x >= 0 and x < h and y >= 0 and y < w and arr[x][y] == '.':
        return True
    else:
        return False

numWay = 0
for i in range(h):
    for j in range(w):
        if arr[i][j] == '.':
            numWay += 1

queue = [[0, 0]]
arr[0][0] = 1
while 1:
    if len(queue) == 0:
        break
    cell = queue[0]
    queue.pop(0)
    x = cell[0]
    y = cell[1]
    n = arr[x][y]
    if(isWay(x-1, y)):
        arr[x-1][y] = n+1
        queue.append([x-1, y])
    if(isWay(x+1, y)):
        arr[x+1][y] = n+1
        queue.append([x+1, y])
    if(isWay(x, y-1)):
        arr[x][y-1] = n+1
        queue.append([x, y-1])
    if(isWay(x, y+1)):
        arr[x][y+1] = n+1
        queue.append([x, y+1])
print(numWay - arr[h-1][w-1])

### FIXED CODE ###

h, w = map(int, input().split())
arr = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
    arr[i] = list(input())

def isWay(x, y):
    if x >= 0 and x < h and y >= 0 and y < w and arr[x][y] == '.':
        return True
    else:
        return False

numWay = 0
for i in range(h):
    for j in range(w):
        if arr[i][j] == '.':
            numWay += 1

queue = [[0, 0]]
arr[0][0] = 1
while 1:
    if len(queue) == 0:
        break
    cell = queue[0]
    queue.pop(0)
    x = cell[0]
    y = cell[1]
    n = arr[x][y]
    if(isWay(x-1, y)):
        arr[x-1][y] = n+1
        queue.append([x-1, y])
    if(isWay(x+1, y)):
        arr[x+1][y] = n+1
        queue.append([x+1, y])
    if(isWay(x, y-1)):
        arr[x][y-1] = n+1
        queue.append([x, y-1])
    if(isWay(x, y+1)):
        arr[x][y+1] = n+1
        queue.append([x, y+1])
if arr[h-1][w-1] == '.':
    print(-1)
else:
    print(numWay - arr[h-1][w-1])
import sys
sys.setrecursionlimit(1000000)
N, M = [int(x) for x in input().split()]
P = [[False] * M for m in range(M)]
dict={}
for m in range(M):
  a, b = [int(x) for x in input().split()]
  P[a-1][b-1] = True
  P[b-1][a-1] = True

def dp(x, past):
  if (x, tuple(past)) in dict:
    return dict[(x, tuple(past))]
  past[x] = True
  if False not in past:
    return 1
  ret = 0
  for i,p in enumerate(P[x]):
    if not p or x == i or past[i]:
      continue
    else:
      ret += dp(i, past[:])
  dict[(x, tuple(past))] = ret
  return ret

print(dp(0, [False] * N))

### FIXED CODE ###

N, M = [int(x) for x in input().split()]
P = [[False] * N for m in range(N)]
dict={}
for m in range(M):
  a, b = [int(x) for x in input().split()]
  P[a-1][b-1] = True
  P[b-1][a-1] = True

def dp(x, past):
  past[x] = True
  if (x, tuple(past)) in dict:
    return dict[(x, tuple(past))]
  if False not in past:
    return 1
  ret = 0
  for i,p in enumerate(P[x]):
    if not p or x == i or past[i]:
      continue
    else:
      ret += dp(i, past[:])
  dict[(x, tuple(past))] = ret
  return ret

if M < N - 1:
  print(0)
else:
  print(dp(0, [False] * N))
from collections import Counter

c = Counter(input() for _ in range(int(input())))
m = max(c.values())
for s in sorted(s for s, k in c.items() if k == m) 
  print(s)


### FIXED CODE ###

from collections import Counter
from itertools import groupby
from operator import itemgetter

c = Counter(input() for _ in range(int(input())))
a = sorted((-c[x],x) for x in c)
for _, s in next(groupby(a, itemgetter(0)))[1]:
  print(s)
a, b = [int(_) for _ in input().split())]
print('Yay!' if a <= 8 and b <= 8 else ':()')


### FIXED CODE ###

a, b = [int(_) for _ in input().split()]
print('Yay!' if a <= 8 and b <= 8 else ':(')
#import decimal
#decimal.getcontext().prec==500 Floatの桁数を500まで増やす
#Decimal(c).sqrt() それで平方根を求める
#Decimal(1) / Decimal(7) 1/7

from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline

M,N=map(int,input().split())
A=list(map(int,input().split()))

data=[]
for i,a in enumerate([2,5,5,4,5,6,3,7,6]):
    if i+1 in A:
        data.append([a,i+1])

data=sorted(data,key=lambda x:x[0])
data.append([0,0])
tempcount=M//data[0][0]
M%=data[0][0]
itelst=list(combinations_with_replacement(range(1,len(data)),int((len(data)-1)*1.5)))
lst2=[]
if M==0:
    lst2.append([data[0][1]]*tempcount)
for i in range(20):
    if tempcount<0:
        break
    for lst in itelst:
        K=M
        for i in lst:
            K-=data[i][0]
        if K==0:
            lst2.append([data[i][1] for i in lst if data[i][0]]+[data[0][1]]*tempcount)
    M+=data[0][0]
    tempcount-=1
lst2=sorted(lst2,key=lambda x:len(x))
lst2=[sorted(i,reverse=True) for i in lst2 if len(i)==len(lst2[-1])][0]
print("".join([str(i) for i in lst2]))


### FIXED CODE ###

#import decimal
#decimal.getcontext().prec==500 Floatの桁数を500まで増やす
#Decimal(c).sqrt() それで平方根を求める
#Decimal(1) / Decimal(7) 1/7

from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline

N,M=map(int,input().split())
A=list(map(int,input().split()))

data=[]
for i,a in enumerate([2,5,5,4,5,6,3,7,6]):
    if i+1 in A:
        data.append([a,i+1])

dic={}
for a,i in reversed(data):
    dic[i]=0
dp=[copy.copy(dic) for i in range(N+1)]

def main(dic1,dic2):
    dic1=sorted([[str(i),dic1[i]] for i in dic],key=lambda x:x[0],reverse=True)
    dic2=sorted([[str(i),dic2[i]] for i in dic],key=lambda x:x[0],reverse=True)
    for a,b in zip(dic1,dic2):
        if a[1]>b[1]:
            return(0)
        if a[1]<b[1]:
            return(1)
    return(0)

def _sum(dic):
    count=0
    for i in dic:
        count+=dic[i]
    return(count)


for a,n in data:
    tempdic=copy.copy(dic)
    tempdic[n]+=1
    if len(dp)-1>=a:
        flag=main(dp[a],tempdic)
        if flag:
            dp[a]=tempdic
    for i in range(len(dp)):
        if i>=a and _sum(dp[i-a]):
            if _sum(dp[i])<_sum(dp[i-a])+1:

                tempdic=copy.copy(dp[i-a])
                tempdic[n]+=1
                dp[i]=tempdic
            elif _sum(dp[i])==_sum(dp[i-a])+1:
                dp[i-a][n]+=1
                flag=main(dp[i],dp[i-a])
                dp[i-a][n]-=1
                if flag:
                    tempdic=copy.copy(dp[i-a])
                    tempdic[n]+=1
                    dp[i]=tempdic
dic=dp[N]
a=""
dic=sorted([[str(i),dic[i]] for i in dic],key=lambda x:x[0],reverse=True)
for i,z in dic:
    for m in range(z):
        a+=i
print(a)
S = input()
count = [0]*2019
mod = 0

for i in range(len(S))
	mod = int(S[-i]) % 2019
	count[mod] += 1

answer = 0

for k in range(2019)
	answer = answer + count[k]

print(answer)

### FIXED CODE ###

S = list(map(int, list(input())))

pops = 0
digi = 1
cnt = [0] * 2019
cnt[0] = 1

while S:
    s = S.pop()

    pops = (pops + s * digi) % 2019
    digi = (10 * digi) % 2019

    cnt[pops] += 1

ans = 0

for i in range(2019):
    ans += cnt[i] * (cnt[i] - 1) // 2

print(ans)
import sys
def index(x,n):
    if x < 0: return 0
    if n < x: return n
    return x

las = map(int,raw_input())
for s in sys.stdin:
    now = map(int,s.split(","))
    nin,lin = len(now)-1,len(las)-1
    if nin > lin: d = -1
    if nin < lin: d = 1
    for i in xrange(nin+1):
        now[i] += max(las[index(i+d,lin)],las[index(i,lin)])
    if not nin: print now[0]
    las = now

### FIXED CODE ###

import sys
def index(x,n):
    if x < 0: return 0
    if n < x: return n
    return x

las = [int(raw_input())]
for s in sys.stdin:
    now = map(int,s.split(","))
    nin,lin = len(now)-1,len(las)-1
    if nin > lin: d = -1
    if nin < lin: d = 1
    for i in xrange(nin+1):
        now[i] += max(las[index(i+d,lin)],las[index(i,lin)])
    if not nin: print now[0]
    las = now
a,b = map(int,input().split())
if A*B%2==0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b = map(int,input().split())
if a*b%2==0:
    print('Even')
else:
    print('Odd')
# dict形式で既出分をもたせる
N, Q = map(int, raw_input().split())
string = raw_input()
a = []
for i in range(Q):
    a.append(map(int, raw_input().split()))
test_dict = {}
test_dict = {}
result = ''
for temp in a:
    if test_dict.get(string[temp[0]-1:temp[1]]):
        result += str(test_dict.get(string[temp[0]-1:temp[1]]))
        continue
    test_dict[string[temp[0]-1:temp[1]]] = string[temp[0]-1:temp[1]].count('AC')
    result += str(test_dict[string[temp[0]-1:temp[1]]])

### FIXED CODE ###

N, Q = map(int, raw_input().split())
string = raw_input()
cnt = [0]
for i in range(N):
#    print(i)
#    print(string[i-2:i])
#    if i == 0:
#        cnt.append(0)
#        continue
    if string[i-1:i+1] == 'AC':
        cnt.append(cnt[i]+1)
        continue
    cnt.append(cnt[i])

for j in range(Q):
    #print(j)
    pare = map(int, raw_input().split())
    print(cnt[pare[1]] - cnt[pare[0]])
from collections import defaultdict


def solve():
    N = int(input())
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

from collections import defaultdict


def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros)


if __name__ == '__main__':
    solve()
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)


N, M = map(int, input().split())
s = input()
t = input()
L = lcm(N, M)
X = [''] * L
for i in range(N):
    X[i * (L // N)] = s[i]
for i in range(M):
    if X[i * (L // M)] == '':
        X[i * (L // M)] = t[i]
    elif X[i * (L // M)] == t[i]:
        continue
    else:
        print(-1)
        exit()
# print(X)
print(L)

### FIXED CODE ###

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


N, M = map(int, input().split())
S = input()
T = input()
L = lcm(N, M)
d = {}
s = set()
for i in range(N):
    d[str(i * (L // N))] = S[i]
    s.add(str(i * (L // N)))

for i in range(M):
    key = str(i * (L // M))
    if key in s:
        if d[key] != T[i]:
            print(-1)
            exit()
print(L)
INF = 10**18

N,M = map(int,input().split())
edge = [list(map(int,input().split())) for i in range(M)]

graph = [[] for _ in range(N)]

for e in edge:
    graph[e[0]-1].append([e[1]-1,-e[2]])
    
dist = [INF for _ in range(N)]
dist[0] = 0

for _ in range(N):
    flag = False
    for node,g in enumerate(graph):
        for adj,cost in g:
            if dist[node] != INF and dist[node]+cost < dist[adj]:
                dist[adj] = dist[node]+cost
                if _==N-1:
                    update = adj
                flag = True
    if not flag:
        print(-dist[N-1])
        break
else:
    visited = [0 for _ in range(N)]
    visited[adj] = 1
    stack = [adj]
    while stack:
        node = stack.pop()
        for adj in graph[node][0]:
            if not visited[adj]:
                visited[adj] = 1
                stack.append(adj)
    if visited[N-1]:
        print('inf')
    else:
        print(-dist[N-1])

### FIXED CODE ###

INF = 10**18

N,M = map(int,input().split())
edge = [list(map(int,input().split())) for i in range(M)]

graph = [[] for _ in range(N)]

for e in edge:
    graph[e[0]-1].append([e[1]-1,-e[2]])
    
dist = [INF for _ in range(N)]
dist[0] = 0

for _ in range(N):
    flag = False
    for node,g in enumerate(graph):
        for adj,cost in g:
            if dist[node] != INF and dist[node]+cost < dist[adj]:
                dist[adj] = dist[node]+cost
                if _==N-1:
                    update = adj
                flag = True
    if not flag:
        print(-dist[N-1])
        break
else:
    visited = [0 for _ in range(N)]
    visited[update] = 1
    stack = [update]
    while stack:
        node = stack.pop()
        for adj,c in graph[node]:
            if not visited[adj]:
                visited[adj] = 1
                stack.append(adj)
    if visited[N-1]:
        print('inf')
    else:
        print(-dist[N-1])
H,W=map(int,input().split())
s=[list(input())for i in range(H)]
c=[['.']*W for i in range(H)]
for i in range(H):
    countX=0
    nowX=s[i][0]
    countY=0
    nowY=s[0][i]
    for j in range(W):
        if nowX==s[i][j]:
            countX+=1
            if 1<countX and nowX=='#':
                c[i][j-1],c[i][j]='#','#'
        else:
            countX=1
        if nowY==s[j][i]:
            countY+=1
            if 1<countY and nowY =='#':
                c[j-1][i],c[j][i]='#','#'
        else:
            countY=1
        nowX=s[i][j]
        nowY=s[j][i]
print('Yes' if c==s else 'No')

### FIXED CODE ###

H,W=map(int,input().split())
s=[list(input())for i in range(H)]
c=[['.']*W for i in range(H)]
for i in range(H):
    countX=0
    nowX=s[i][0]
    for j in range(W):
        if nowX==s[i][j]:
            countX+=1
            if 1<countX and nowX=='#':
                c[i][j-1],c[i][j]='#','#'
        else:
            countX=1
        nowX=s[i][j]
for i in range(W):
    countY=0
    nowY=s[0][i]
    for j in range(H):
        if nowY==s[j][i]:
            countY+=1
            if 1<countY and nowY =='#':
                c[j-1][i],c[j][i]='#','#'
        else:
            countY=1
        nowY=s[j][i]
print('Yes' if c==s else 'No')
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print((int(factorial(k-1) * factorial(n-k+1)/factorial(i-1)/factorial(k-i)/factorial(i)/factorial(n-k+1-i))%((10**9)+7)))
  else:
    print(0)

### FIXED CODE ###

import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)
N = int(input())
A = list(map(int, input().split()))
import numpy as np
if 0 in A:
    print(0)
    exit(0)
    
ans = np.prod(A)
if ans<= 10**18:
    print(ans)
    exit(0)
else:
    print(-1)


### FIXED CODE ###

import sys  # sys.exit()を使いたいので

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

if 0 in a:
# 0が1つでもあれば0です
    print(0)
else:
# 0がない場合
    cur = 1  # 現在の数値
    for x in a:
        cur *= x
        if cur > 10 ** 18:
        # 10**18を超えたので終了します
            print(-1)
            sys.exit()
    print(cur)  # 10**18以下なので、出力します
page = input()
if page%2 = 0 :
  print(page/2)
elif page%2 = 1 :
  print(page/2 + 1)

### FIXED CODE ###

page = int(input())

if page%2 == 0 :
  print(int(page/2))
elif page%2 == 1 :
  print(page//2 + 1)
a,b = map(int,input().split())

if a > b :
 print("a > b")
elif a < b :
 print("a < b")
eles:
 print("a == b")

### FIXED CODE ###

a, b = map(int,input().split())
 
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")
n = int(input())
# li = list(range(1, n+1))
ans = 10**10
for a in range(10**(len(str(n))//2-1), 10**(len(str(n))//2+1)):
    if n % a == 0:
        b = n//a
        if ans > max(len(str(a)), len(str(b))):
            ans = max(len(str(a)), len(str(b)))

print(ans)


### FIXED CODE ###

import math
n = int(input())
ans = 10**10
for a in range(math.ceil(math.sqrt(n)), 0, -1):
    if n % a == 0:
        b = n//a
        # if ans > max(len(str(a)), len(str(b))):
        ans = max(len(str(a)), len(str(b)))
        break

print(ans)
n, a, b, c, d = [int(i) for i in input().split()]
s = input()
t = s.split("#")
cnt = -1
if(s.count('##') > 0):
    frag = 0
elif(c<d):
    frag = 1
else:
    for i in range(len(t)): #cnt...(i個目の#までの文字数),cntがdより小さかったら抜かせる
        if(cnt < d and i > 0):
                if(t[i].count('.') >= 3):
                    frag = 1
        cnt += len(t[i])+1
if(frag == 0):
    frag2 = 0
    frag3 = 0
    frag4 = 0    
    if(s[b] == '.'):
        frag2 = 1
    if(s[d-2] == '.' or s[d] == '.'):
        frag3 = 1
    if(d + 1 < c):
        frag4 = 1
    if(frag2 == 1 and frag3 == 1 and frag4 == 1):
        frag = 1
if(frag == 1):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n, a, b, c, d = map(int, input().split())
s = list(input())
last = ""
for i in range(a, max(c, d)):
    if last == "#" and s[i] == "#":
        print("No")
        exit()
    last = s[i]
flag = False
if c > d:
    s[b - 1] = "#"
    for i in range(a, c):
        if last == "#" and s[i] == "#":
            flag = True
        last = s[i]
    s[b - 1] = "."
    count = 0
    for i in range(b - 1, d + 1):
        if s[i] == ".":
            count += 1
            if count == 3:
                flag = False
        else:
            count = 0
else:
    for i in range(b, d):
        if last == "#" and s[i] == "#":
            flag = True
        last = s[i]
if not flag:
    print("Yes")
else:
    print("No")
x,n = map(int,input().split())
P = list(map(int,input().split()))


all_l = [i for i in range(1,101)]
for p in P:
    all_l.remove(p)

ans = []
c = 0
dic = {}
for a in all_l:
    if c == 0:
        diff = abs(x-a)
    c+=1
    diff_now = abs(x-a)
    diff = min(diff,diff_now)
    #print(diff,diff_now)
    memo = diff_now
    #print('memo:',memo,'diff:',diff)
    if memo == diff:
        dic['{}'.format(str(a))] = diff
        
        
l = []
for k,v in  dic.items():
    l.append(v)
m = min(l)
k_list = []
for k,v in dic.items():
    if v==m:
        k_list.append(k)
#print(k_list)
max(k_list)

### FIXED CODE ###

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


all_l = [i for i in range(0,101)]
for p in P:
    all_l.remove(p)

kouho = x
for i in range(200):
    kouho1 = x-i
    kouho2 = x+i
    if kouho1 not in P:
        print(x-i)
        break
    elif kouho2 not in P:
        print(x+i)
        break
s = input()
r = set(map(chr, range(97, 97+26)))
r = r - set(s)
r = min(r)
print(r)

### FIXED CODE ###

s = input()
r = set(map(chr, range(97, 97+26)))
r = r - set(s)
if len(r) == 0:
    print('None')
else:
    r = min(r)
    print(r)
a,b,c=map(int,input().split())
print(a+b if a+B<=c else c)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(a*b if a*b<=c else c)
s=map(str, input().split())
t=map(str,i nput().split())
c = 0
for i in range(3):
  if s[i] == t[i]:
    c = c + 1
print(c)

### FIXED CODE ###

s = input()
t = input()
c=0
if s[0]==t[0]:
  c = c + 1

if s[1]==t[1]:
  c = c + 1

if s[2]==t[2]:
  c = c + 1
  
print(c)
y= N%1000
print(y)

### FIXED CODE ###

N=int(input())
if  N % 1000 == 0:
  print(0)
else:
    print(1000 - N % 1000)
, m = map(int, input().split())
nl=[]
ml=[]
for i in range(n):
    nl.append(input())
for i in range(m):
    ml.append(input())

cnt=0
Yes=False
for i in nl:
    if(ml[0] in i):
        idx = i.find(ml[0])
        cnt2=cnt+1
        for j in range(1,m):
            if cnt2>n-1:
                ok = False
                break
            elif(not ml[j]==nl[cnt2][idx:idx+m]):
                ok=False
                break
            elif(j==m-1):
                Yes = True
                break
            cnt2+=1
    if(Yes):
        break
    cnt+=1
if Yes:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n, m = map(int, input().split())
nl=[]
ml=[]
for i in range(n):
    nl.append(input())
for i in range(m):
    ml.append(input())

cnt=0
Yes=False
for i in nl:
    if(ml[0] in i):
        idx = i.find(ml[0])
        cnt2=cnt+1
        if m==1:
            Yes = True
            break
        for j in range(1,m):
            if cnt2>n-1:
                break
            elif(not ml[j]==nl[cnt2][idx:idx+m]):
                break
            elif(j==m-1):
                Yes = True
                break
            cnt2+=1
    if(Yes):
        break
    cnt+=1
if Yes:
    print("Yes")
else:
    print("No")
from heapq import heapify, heappop

N, K = map(int, input().split())
vl = list(map(int, input().split()))
vr = list(reversed(vl))
sum_L = [0]
for vv in vl:
    sum_L.append(sum_L[-1] + vv)

sum_R = [0]
for vv in vr:
    sum_R.append(sum_R[-1] + vv)

ans = 0
for pick in range(K + 1):
    put = K - pick
    if pick < put: continue
    for left in range(pick + 1):
        m_put = put
        right = pick - left
        t = sum_L[left] + sum_R[right]
        q = vl[:left] + vr[:right]
        heapify(q)
        while m_put > 0:
            t -= heappop(q)
            m_put -= 1
        ans = max(ans, t)
print(ans)


### FIXED CODE ###

from heapq import heapify, heappop

N, K = map(int, input().split())
vl = list(map(int, input().split()))
vr = list(reversed(vl))
sum_L = [0]
for vv in vl:
    sum_L.append(sum_L[-1] + vv)

sum_R = [0]
for vv in vr:
    sum_R.append(sum_R[-1] + vv)

ans = 0
for pick in range(min(K, N) + 1):
    for to_remove in range(K + 1):
        if pick + to_remove > K: break
        for left in range(pick + 1):
            right = pick - left

            t = sum_L[left] + sum_R[right]

            q = vl[:left] + vr[:right]
            heapify(q)

            cnt = 0
            while cnt < to_remove and q:
                t -= heappop(q)
                cnt += 1
            ans = max(ans, t)
print(ans)
n, m = [int(v) for v in input().split()]
a, b = [], []
d = {}
for i in range(m):
    ai, bi = [int(v) for v in input().split()]
    a.append(ai)
    b.append(bi)
    d[ai] = d.get(ai, [])
    d[ai].append(bi)
    d[bi] = d.get(bi, [])
    d[bi].append(ai)

r = [(0, 0) for i in range(n)]
def trace(no, lv):
    lst = d[no]
    for c in lst:
        if c != 1:
            dig = (r[c-1][0] == 0 and c != 1)
            if r[c-1][0] == 0 or r[c-1][1] > lv:
                r[c-1] = (no, lv)
                if dig:
                    trace(c, lv + 1)
trace(1, 1)

if 0 in r[1:]:
    print('No')
else:
    print('Yes')
    for s,_ in r[1:]:
        print(s)

### FIXED CODE ###

n, m = [int(v) for v in input().split()]
a, b = [], []
d = {}
for i in range(m):
    ai, bi = [int(v) for v in input().split()]
    a.append(ai)
    b.append(bi)
    d[ai] = d.get(ai, [])
    d[ai].append(bi)
    d[bi] = d.get(bi, [])
    d[bi].append(ai)

r = {}
def trace():
    tasks = [(1, 0)]
    i = 0
    while i < len(tasks):
        no, lv = tasks[i]
        for c in d[no]:
            if c != 1:
                if c not in r or (r[c][1] > lv and r[c][1] != 0):
                    r[c] = (no, lv)
                    tasks.append((c, lv + 1))
        i += 1
trace()

for i in range(2, n):
    if i not in r:
        print('No')
        break
else:
    print('Yes')
    for i in range(2, n +1):
        print(r[i][0])