Harryxun/stf_run huggingface dataset:
k = int(input())
a, b = map(int, input().split())
if a % k == 0:
    print('OK')
elif (b-a) // k >= 1:
    print('OK')
else:
    print(NG)

### FIXED CODE ###

k = int(input())
a, b = map(int, input().split())
if b // k - a // k > 0:
    print('OK')
elif a % k == 0:
    print('OK')
else:
    print('NG')
a=[]
for i in range(4):
    b=int(input())
    a.append(b)
c=int(input())
if a[0] - a[4] <= c:
    print('Yay!')
else:
    print(':(')

### FIXED CODE ###

a=[]
for i in range(5):
    b=int(input())
    a.append(b)
c=int(input())
if a[4] - a[0] <= c:
    print('Yay!')
else:
    print(':(')
n=int(input())
ar=[]
c=0
m=0
cur=0
for i in range(0,n):
    ar.append(int(input()))
for i in range(0,n):
    cur=i
    for j in range(i+1,n):
        if(cur+1<n):
            if(ar[cur]>=ar[cur+1]):
                c+=1
                cur+=1
            else:
                break
    if(m<c):
        m=c
    c=0


print(m)

### FIXED CODE ###

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

count = 0
count_list = [0]

for i in range(n-1):
	if(h[i+1] <= h[i]):
		count += 1
		count_list.append(count)
	else:
		count = 0

print(max(count_list))
N,M=map(int,input().split())
s=[0]*N
c=[0]*N
for i in range(M):
    s[i],c[i]=map(int,input().split())

A=["-1"]*N
for i in range(M):
    if A[s[i]-1]=="-1" or A[s[i]-1]==c[i]:
        A[s[i]-1]=c[i]
    else:
        print("-1")
        exit()

if N==3:
    if A[0]==0:
        print("-1")
        exit()
if N==2:
    if A[0]==0:
        print("-1")
        exit()

for i in range(N):
    if A[i]=="-1":
        A[i]=0

a=0
for i in range(N):
    a+=A[i]*10**(N-i-1)

print(a)

### FIXED CODE ###

N,M=map(int,input().split())
s=[0]*M
c=[0]*M
for i in range(M):
    s[i],c[i]=map(int,input().split())

A=["-1"]*N
for i in range(M):
    if A[s[i]-1]=="-1" or A[s[i]-1]==c[i]:
        A[s[i]-1]=c[i]
    else:
        print("-1")
        exit()

if N==3:
    if A[0]==0:
        print("-1")
        exit()
if N==2:
    if A[0]==0:
        print("-1")
        exit()

for i in range(N):
    if A[i]=="-1":
        A[i]=0

a=0
for i in range(N):
    a+=A[i]*10**(N-i-1)

if N==2 and a<10:
    a+=10
if N==3 and a<99:
    a+=100

print(a)
def insertionSort( nums, n, g ):
	cnt = 0
	for i in range( g, len( nums ) ):
		v = nums[i]
		j = i - g
		while 0 <= j and v < nums[j]:
			nums[ j+g ] = nums[j]
			j -= g
			cnt += 1
		nums[ j+g ] = v
	
	return cnt


def shellSort( nums, n ):
	cnt = 0
	g = []
	val =0
	for i in range( 0, n ):
		val = 3*val+1
		if  n < val:
			break
		g.append( val )

	g.reverse( )
	m = len( g )
	print( m )
	print( " ".join( map( str, g ) ) )
	for i in range( 0, m ):
		cnt += insertionSort( nums, n, g[i] )
	print( cnt )
n = int( input( ) )
nums = []
for i in range( 0, n ):
	nums.append( int( input( ) ) )

shellSort( nums, n )
output = []
for i in nums:
	output.append( str( i ) )
	output.append( "\n" )

output.pop( )
print( "".join( output ) )

### FIXED CODE ###

import sys
 
def insertionSort( nums, n, g ):
    cnt = 0
    i = g
    while i < n:
        v = nums[i]
        j = i - g
        while 0 <= j and v < nums[j]:
            nums[ j+g ] = nums[j]
            j -= g
            cnt += 1
        nums[ j+g ] = v
        i += 1
    return cnt
         
def shellSort( nums, n ):
    g = []
    val = 1
    while val <= n:
        g.append( val )
        val = 3*val+1
     
    g.reverse( )
    m = len( g )
    print( m )
    print( " ".join( map( str, g ) ) )
    cnt = 0
    for i in range( m ):
        cnt += insertionSort( nums, n, g[i] )
    print( cnt )
     
n = int( sys.stdin.readline( ) )
nums = []
for i in range( n ):
    nums.append( int( sys.stdin.readline( ) ) )
 
shellSort( nums, n )
print( "\n".join( map( str, nums ) ) )
while True:
    n,x = map(int,raw_input().split())
    count = 0;
    for i in range(1,n + 1):
        for j in range(1,n + 1):
            if i == j:break
            for k in range(1,n + 1):
                if j == k:break
                if i + j + k == x:
                    count+=1
                    print i,j,k,"=",i+j+k
                    break
    print count

### FIXED CODE ###

while True:
    n,x = map(int,raw_input().split())
    count = 0;
    if n == 0 and x == 0:break
    for i in range(1,n + 1):
        for j in range(1,n + 1):
            if i == j:break
            for k in range(1,n + 1):
                if j == k:break
                if i + j + k == x:
                    count+=1
                    break
    print count
n = int(input())
can = []
xyh = []
for _ in range(n):
  xyh.append(list(map(int,input().split())))
time = 0
while xyh[time][2] == 0:
  time += 1
x,y,h = xyh[time]
for i in range(101):
  for j in range(101):
    can.append([i, j, h + abs(x-i) + abs(y-j)])
step = 0
while len(can) != 1:
  x,y,h = xyh[(time + step) % n]
  if h != 0:
    cnt = 0
    while cnt < len(can):
      now = can[cnt]
      if now[2] != h + abs(x-now[0]) + abs(y-now[1]):
        del can[cnt]
      else:
        cnt += 1
  else:
    cnt = 0
    while cnt < len(can):
      now = can[cnt]
      if now[2]  < abs(x-now[0]) + abs(y-now[1]):
        del can[cnt]
      else:
        cnt += 1
  step += 1
  if step > n:
    break
print(' '.join(list(map(str,can[0]))))

### FIXED CODE ###

n = int(input())
can = []
xyh = []
for _ in range(n):
  xyh.append(list(map(int,input().split())))
time = 0
while xyh[time][2] == 0:
  time += 1
x,y,h = xyh[time]
for i in range(101):
  for j in range(101):
    can.append([i, j, h + abs(x-i) + abs(y-j)])
step = 0
while len(can) != 1:
  x,y,h = xyh[(time + step) % n]
  if h != 0:
    cnt = 0
    while cnt < len(can):
      now = can[cnt]
      if now[2] != h + abs(x-now[0]) + abs(y-now[1]):
        del can[cnt]
      else:
        cnt += 1
  else:
    cnt = 0
    while cnt < len(can):
      now = can[cnt]
      if now[2] > abs(x-now[0]) + abs(y-now[1]):
        del can[cnt]
      else:
        cnt += 1
  step += 1
print(' '.join(list(map(str,can[0]))))
n = int(input())
dat = list(map(int. input().split()))
print(min(dat). max(dat).sum(dat))

### FIXED CODE ###


n = int(input())
dat = list(map(int, input(). split()))
print(min(dat), max(dat), sum(dat))
N = int(input())
T, A = map(int, input().split())
H_list = [int(e) for e in input().split()]

diff=1000000
ans = 0

for i in H_list:
	 
    if abs(A-(T−i*0.006)) < diff
    	diff = abs(A-(T−i*0.006))
        ans=i
        
print(ans)

### FIXED CODE ###

N = int(input())
T, A = map(int, input().split())
H_list = [int(e) for e in input().split()]
     
diff=1000000
ans = 0
     
for i in range(len(H_list)):
  if abs(T-H_list[i]*0.006-A)<diff:
    diff = abs(T-H_list[i]*0.006-A)
    ans = i
    
print(ans+1)
s = input()
result = 0
while True:
  t = len(s)
  for i in range(len(s) - 1):
    if s[i] != s[i + 1]:
      result += 2
      s = s[:i] + s[i+2:]
      print(s)
      break
  if len(s) == t:
    break
print(result)


### FIXED CODE ###

s = input()
t = len([c for c in s if c == '0'])
print(2 * min(t, len(s) - t))
A, B, C, D = map(int, input().split())

n = int(A/D)
m = int(C/B)

if n>m:
    x = n
else :
    x = m
    
for i in range(1, x+1):
    a = C - B
    t = A - D
    if a <= 0:
        print('Yes')
        break
    elif t <= 0:
        print('No')
        break

### FIXED CODE ###

S, W = map(int, input().split())

if S>W:
    print('safe')
else:
    print('unsafe')
X = [str(input()) for _ in range(5)]

endzero = 0
elesnum = []
for x in X:
  if x[-1] == "0":
    endzero += int(x)
  else:
    elesnum.append(x)
elesnum.sort(key = lambda x: x[-1])
last = elesnum[0]
for e in elesnum[1:]:
  endzero += (int(e)//10+1)*10
print(endzero+int(last))

### FIXED CODE ###

X = [input() for _ in range(5)]
endzero = 0
elesnum = []
for x in X:
  if x[-1] == "0":
    endzero += int(x)
  else:
    elesnum.append(x)
if elesnum:
  elesnum.sort(key = lambda x: x[-1])
  min_ = int(elesnum[0])
  for e in elesnum[1:]:
    endzero += (int(e)//10+1)*10
  print(endzero+min_)
else:
  print(endzero)
n, k = map(int, input().split())
pn = list(map(int, input().split()))
cn = list(map(int, input().split()))

ans = -float('inf')
if k > n:
    m = k // n-1
    k = k - n*m

for i in range(n): #start
    now = i
    total = 0
    for j in range(1, k+1):
        now = pn[now]-1
        total += cn[now]
        ans = max(ans, total)

if sum(cn) >0:
    ans += sum(cn)*m

print(ans)

### FIXED CODE ###

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

ans = -float('inf')

for i in range(n): #start
    start = i
    now = start
    total = 0
    ls = [0]

    for j in range(1, k+1):
        now = pn[now]-1
        total += cn[now]
        ans = max(ans, total)
        ls.append(total)
        if now == start:
            rp = j
            break
    else:
        continue

    if total <= 0:
        continue
    else:
        if k % rp == 0:
            s = k % rp
            ans2 = total * (k // rp-1) + max(ls)
            ans = max(ans, ans2)
        else:
            s = k % rp
            ans2 = total * (k//rp) + max(ls[:s+1])
            ans = max(ans, ans2)
print(ans)
a,b=input().split()
c=(a*b)%2
if c == 1:
  print(Odd)
else:
  print(Even)

### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2 == 1:
  print('Odd')
else:
  print('Even')
abc=[int(i) for i in input().split()]

abc.sort()

def func(a,b,c):
    return int((c-a)/2+(c-b)/2)


if abc[0]%2==abc[1]%2:
    if abc[0]%2!=abc[2]%2:
        print(func(abc[0]+1,abc[1]+1,abc[2])+1)
    else:
        print(func(abc[0],abc[1],abc[2]))
else:
    if abc[0]%2==abc[2]%2:
        print(func(abc[0]+1,abc[1],abc[2]+1)+1)
    else:
        print(func(abc[0],abc[1]+1,abc[2+1])+1)

### FIXED CODE ###

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

abc.sort()

def func(a,b,c):
    return int((c-a)/2+(c-b)/2)

if abc[0]%2==abc[1]%2:
    if abc[0]%2!=abc[2]%2:
        print(func(abc[0]+1,abc[1]+1,abc[2])+1)
    else:
        print(func(abc[0],abc[1],abc[2]))
else:
    if abc[0]%2==abc[2]%2:
        print(func(abc[0]+1,abc[1],abc[2]+1)+1)
    else:
        print(func(abc[0],abc[1]+1,abc[2]+1)+1)
n = int(input())
s = input()
 
stat = False
if n%2==0:
    m = n//2
    stat = (s[:m]==s[m:])
if stat:   
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

### FIXED CODE ###

r = int(input())
print(r**2)
n=int(input())
s=list(str(input()))
count=0
for i in range(len(s)):
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
        count+=1
print(count)

### FIXED CODE ###

n=int(input())
s=input()
count=0
for i in range(len(s)-2):
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
        count+=1
print(count)
n = int(input())
s = input()
csum = [1]

for i in range(1, n):
    if s[i] in s[:i]:
        csum.append(int(csum[-1] * 1.5 + 0.5))
    else:
        csum.append(csum[-1] * 2 + 1)

print(csum[-1])

### FIXED CODE ###

n = int(input())
s = input()
ans = 1
mod = 10**9 + 7
for x in set(s):
    ans *= s.count(x) + 1
    ans %= mod

print((ans - 1) % mod)
from line_profiler import LineProfiler
from collections import deque

def main():
    while(True):
        W, H = map(int, input().split())
        # print(W,H)
        if not W: break
        tx,ty = map(int, input().split())
        kx,ky = map(int, input().split())
        ma = [[False]*(W+2) for _ in range(H+2)]
        for i in range(1,H+1):
            for j,a in enumerate(input().split()):
                ma[i][j+1] = bool(1-int(a))
        from pprint import pprint
        que = deque([[tx,ty,kx,ky,0]])
        # pa = [[[[False]*(W+2) for ii in range(H+2)] for jj in range(W+2)] for kk in range(H+2)]
        pas = []
        ans = "NA"
        while(que):
            # if len(que)>10:break
            # pprint(que)
            tx,ty,kx,ky,c = que.popleft()
            # import copy
            # toprint = copy.deepcopy(ma)
            # toprint[ty][tx] = "tt"
            # toprint[ky][kx] = "kk"
            # for i in range(H+2):
            #     print("".join(( toprint[i][j] if toprint[i][j] in ["tt","kk"] else "  ") if toprint[i][j] else "**" for j in range(W+2)))
            if c > 100: break
            if tx == kx and ty == ky:
                ans = c
                break
            for dx,dy in [[-1,0],[0,-1],[1,0],[0,1]]:
                tdx, tdy = [ dx, dy] if ma[ty+dy][tx+dx] else [0,0]
                kdx, kdy = [-dx,-dy] if ma[ky-dy][kx-dx] else [0,0]
                # if pa[tx+tdx][ty+tdy][kx+kdx][ky+kdy]: continue
                if [tx+tdx,ty+tdy,kx+kdx,ky+kdy] in pas: continue
                que.append([tx+tdx,ty+tdy,kx+kdx,ky+kdy,c+1])
                # pa[tx+tdx][ty+tdy][kx+kdx][ky+kdy] = True
                pas.append([tx+tdx,ty+tdy,kx+kdx,ky+kdy])
        print(ans)
        # pprint(ma)

if __name__ == "__main__":
    prf = LineProfiler()
    prf.add_function(main)
    prf.runcall(main)
    prf.print_stats()
    # main()


### FIXED CODE ###

# from line_profiler import LineProfiler
from collections import deque
from sys import stdin

def main():
    while(True):
        W, H = map(int, stdin.readline().split())
        if not W: break
        tx,ty = map(int, stdin.readline().split())
        kx,ky = map(int, stdin.readline().split())
        ma = [[False]+[bool(1-int(a)) for a in stdin.readline().split()]+[False] for i in range(H)]
        ma = [[False]*(W+2)] + ma + [[False]*(W+2)]
        que = deque([[tx,ty,kx,ky,0]])
        pas = set()
        ans = "NA"
        while(que):
            tx,ty,kx,ky,c = que.popleft()
            if tx == kx and ty == ky:
                ans = c
                break
            if c+1 > 100: continue
            for dx,dy in [[-1,0],[0,-1],[1,0],[0,1]]:
                tdx, tdy = ( dx, dy) if ma[ty+dy][tx+dx] else (0,0)
                kdx, kdy = (-dx,-dy) if ma[ky-dy][kx-dx] else (0,0)
                if (tx+tdx,ty+tdy,kx+kdx,ky+kdy) in pas: continue
                que.append([tx+tdx,ty+tdy,kx+kdx,ky+kdy,c+1])
                pas.add((tx+tdx,ty+tdy,kx+kdx,ky+kdy))
        print(ans)

if __name__ == "__main__":
    # prf = LineProfiler()
    # prf.add_function(main)
    # prf.runcall(main)
    # prf.print_stats()
    main()
import bisect

n, m = list(map(int, input().split()))
cl = list(map(int, input().split()))
cl.sort()
ql=[]
for _ in range(m):
    b, c = list(map(int, input().split()))
    for _ in range(b):
        ql.append(c)
ql.sort()
ql.reverse()
ans=0
for c in cl:
    if c < ql[0]:
        ans+=ql[0]
        del ql[0]
    else:
        ans+=c
print(ans)

### FIXED CODE ###

n, m = list(map(int, input().split()))
cl = list(map(int, input().split()))
cl.sort()
ql=[]
for _ in range(m):
    b, c = list(map(int, input().split()))
    ql.append([b,c])
ql.sort(key=lambda x: x[1],reverse=True)
i, j = 0,0
while i < len(cl) and j < len(ql):
    if cl[i] < ql[j][1]:
        cl[i] = ql[j][1]
        ql[j][0] -=1
        if ql[j][0] == 0:
            j+=1
    i+=1
print(sum(cl))
a = [input().split() for l in range(2)]
print(a)

N = int(a[0][0]) 
M = int(a[0][1]) 
X = int(a[0][2]) # current place 

goal_len01 = N - X # end place
goal_len02 = X # start place

cost1 = 0
for i in range(goal_len01):
  if str(X+i+1) in a[1]:
    cost1 += 1

cost2 = 0
for i in range(goal_len02):
  if str(i+1) in a[1]:
    cost2 += 1

min_cost = 0
if cost1 >= cost2:
  min_cost = cost2
else:
  min_cost = cost1
  
print(min_cost)

### FIXED CODE ###

#!/usr/bin/python
 
input_data = list(map(int,input().split()))
 
neko = input_data[0]
neko_inu = input_data[1]
d = input_data[2]
 
if neko > d:
    print("NO")
elif neko+neko_inu < d:
    print("NO")
else:
    print("YES")
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
i=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(flag=True):
            a[i]=a[i]*3
        elif(a[i]%2==0):
            #print(i)
            a[i]=a[i]/2
            count+=1
            flag=True
        else:
            a[i]=a[i]*3
print(count)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        while(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            #print(a)
            count+=1
            flag=True
            #break
print(count)
#たぶんリスト全部に3かけて該当を６で割ればよさそう
#３倍する必要がない
a = map(int, input().split())
n = sum(a)
if a <= 21:
  print('win')
else:
  print('burst')

### FIXED CODE ###

a = map(int, input().split())
if sum(a) <= 21:
    print('win')
else:
    print('bust')
m= (input().count('o')
print(str(700+m*100))


### FIXED CODE ###

m=input().count("o")
print(700+m*100)
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

### FIXED CODE ###

S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)
A,B,C=map(str,input().split())
ans=eval('A' 'B' 'C')
print(ans)


### FIXED CODE ###

print(eval(input()))
x = input().split()
s = input()
n = int(x[0])
a = int(x[1])
b = int(x[2])
c = int(x[3])
d = int(x[4])
 
 
kome_flag = False
santen_flag = False
 
a_s = s[a:c]
b_s = s[b:d]
 
if c < d:
  santen_flag = True
if d < c:
  if '...' in s[b-1:d]:
    santen_flag = True
  
if not '##' in a_s and not '##' in b_s:
  kome_flag = True
    
if not '#' in b_s:
	print('Yes')
else:
	if c < d:
		if kome_flag:
			print('Yes')
		else:
			print('No')
 
	if d < c:
		if kome_flag and santen_flag:
			print('Yes')
		else:
			print('No')
x = input().split()
s = input()
n = int(x[0])
a = int(x[1])
b = int(x[2])
c = int(x[3])
d = int(x[4])
 
 
kome_flag = False
santen_flag = False
 
a_s = s[a-1:c]
b_s = s[b-1:d]

if c < d:
  santen_flag = True
if d < c:
  if '...' in s[b-1:d]:
    santen_flag = True
  
if not '##' in a_s and not '##' in b_s:
  kome_flag = True
    
if not '#' in b_s:
	print('Yes')
else:
	if c < d:
		if kome_flag:
			print('Yes')
		else:
			print('No')
 
	if d < c:
		if kome_flag and santen_flag:
			print('Yes')
		else:
			print('No')


### FIXED CODE ###

x = input().split()
s = input()
n = int(x[0])
a = int(x[1])
b = int(x[2])
c = int(x[3])
d = int(x[4])
 
 
kome_flag = False # ##がないとTrue
santen_flag = False # ... があればTrue
 
a_s = s[a:c]
b_s = s[b:d]
 
 
if d < c:
  if '...' in s[b-2:d+1]:
    santen_flag = True
kome_flag = True
if '##' in a_s or '##' in b_s:
  kome_flag = False
    

if True:
	if c < d:
		if kome_flag:
			print('Yes')
		else:
			print('No')
 
	if d < c:
		if kome_flag and santen_flag:
			print('Yes')
		else:
			print('No')
A, B, C = list(map(int, input().split()))
if A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
	print(0)
else:
	ABC = sort([A, B, C])
	print(ABC[0] * ABC[1])

### FIXED CODE ###

A, B, C = list(map(int, input().split()))
if A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
	print(0)
else:
	ABC = sorted([A, B, C])
	print(ABC[0] * ABC[1])
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.compareTo("2019/04/30") <= 0){
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
    }
}


### FIXED CODE ###

s = input()
s = list(map(int, s.split("/")))
if s[0] <= 2019 and s[1] <= 4 and s[2] <= 30:
    print("Heisei")
else:
    print("TBD")
def judge1(Num,a):
    s = []
    for l in range(2,Num):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s.append(1)
            else:
                s.append(0)
        else:
            s.append(0)
    return s

N = int(input())
S = input()
a = judge1(N,S)
if 1 == a[0]:
    print("yes")
else:
    print("No")

### FIXED CODE ###

def judge(N,str):
    a = list(str)
    b = []
    c = []
    if N%2 == 0:
        for k in range(int(N/2)):
            b.append(a[k])
            c.append(a[k+int(N/2)])
        if b == c:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
N = int(input())
S = input()
judge(N,S)
n=int(input())
m=n/3
o=o**3
print(o)


### FIXED CODE ###

n=int(input())
m=n/3
o=m**3
print(o)
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

shaku = []

for i in range(n-k+1):
    start = i
    end = start + k
    h = a[start] * a[start+1]
    now = start + 2
    while now < end:
        if (0 in a[now:end]):
            h = 0
            break

        h *= a[now]
        now += 1

    shaku.append(h)

for i in range(len(shaku)-1):
    if (shaku[i] < shaku[i+1]):
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

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

ans = []
for i in range(n-k):
    if (a[i] < a[i+k]):
        ans.append("Yes")
    else:
        ans.append("No")

for i in range(len(ans)):
    print(ans[i])
import sys
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [False] * n
now = 0
count = 0
history = [1]

while b[now] == False:
  history.append(a[now])
  b[now] = True
  count += 1
  if count >= k:
    print(a[now])
    sys.exit()
  now = a[now]-1

if now != 0:
  k -= now + 1
  history = history[now+1:]
history.pop()
print(history[k % len(history)])


### FIXED CODE ###

n, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [-1] * (n+1)
now = 1
history = []

while b[now] == -1:
  b[now] = len(history)
  history.append(now)
  now = a[now-1]

c = len(history) - b[now]
l = b[now]

if k < l:
  print(history[k])
else:
  k -= l
  k %= c
  print(history[l+k])
# -*- coding: utf-8 -*-
n = int(input())
v = input()
c = input()
ri = 0
for i in range(0,n):
    a  = v[i] - c[i] 
    if a > 0:
        ri += a
    else:
        pass
print(ri)

### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ri = 0
for i in range(0,n):
    a  = v[i] - c[i] 
    if a>0:
        ri += a
    else:
        pass
print(ri)
x,a=map(int,input().split())
b=0
c=0
A = [int(input()) for _ in range(x)]
while b<=a:
    b=b+A[c]
    c+=1
print(c)

### FIXED CODE ###

a,b=map(int,input().split())
l=list(map(int,input().split()))
c=1
d=0
r=len(l)
for i in range(r):
    d=d+l[i]
    if d<=b:
        c=c+1
 
        
print(c)
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1] and i==n-2:
        ans.apppend(ido)
    elif num[i]<num[i+1]:
        ans.append(ido)
        ido=0

print(max(ans))


### FIXED CODE ###

# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[0]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido+0)
        ido=0

print(max(ans))
N = input()
A = 0 if N%1000 == 0 else A = (1+N//1000)*1000-N
print(A)

### FIXED CODE ###

print((10000-int(input()))%1000)
n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  answer+=i
print(answer)

### FIXED CODE ###

n,l=map(int,input().split())
ans=[]
for i in range(n):
  s=list(input())
  ans.append(s)
ans.sort()
answer=""
for i in ans:
  p="".join(i)
  answer+=p
print(answer)