Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A=[]
B=[]
for i in range(N):
    a,b = map(int,input().split())
    c = 0
    A.append(a)
    B.append(b)
def merge_sort(arr,b):
    if len(arr) <= 1:
        return (arr,b)

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]
    leftt =b[:mid]
    rightt = b[mid:]

    # 再帰的に分割を行う
    left,leftt = merge_sort(left,leftt)
    right,rightt = merge_sort(right,rightt)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right,leftt,rightt)


def merge(left, right,leftt,rightt):
    merged = []
    mergedd = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            mergedd.append(leftt[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            mergedd.append(rightt[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
        mergedd.extend(leftt[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
        mergedd.extend(rightt[r_i:])
    return (merged,mergedd)
B,A = merge_sort(B,A)
found = True
SUM = 0
for i in range(N):
    SUM = SUM + A[i]
    if B[i] < SUM:
        found = False
if found:
    print("Yes")
else:
    print("No")
    



Fixed submission:
a = input()
if a[0]!=a[1] and a[1]!=a[2] and a[2]!=a[3] :
    print("Good")
else:
    print("Bad")

Buggy python submission (verdict: Runtime Error):
a = input()
if a[0]!=a[1] and a[1]!=a[2] and a[2]!=a[3] and a[3]!=a[4]:
    print("Good")
else:
    print("Bad")

Fixed submission:
a = input()
if a[0]!=a[1] and a[1]!=a[2] and a[2]!=a[3] :
    print("Good")
else:
    print("Bad")
Buggy python submission (verdict: Runtime Error):
N,K= map(int,input().split())
List=list(map(int,input().split()))
c = 0
for i in range(N):
    A = List[i]
    for k in range(l,N-i):
        if A >= K:
            c += N-i-k
            l = k
            break
        if k != N-i-1:
            A=A +List[k+i+1]
print(c)

Fixed submission:
X,A = map(int,input().split())
if X < A:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
N,X= map(int,input().split())
List=list(map(int,input().split()))
a = 0
i = 0
while a <= X and i <=N:
    a = a + List[i]
    i = i + 1
print(i)

Fixed submission:
N,X= map(int,input().split())
List=list(map(int,input().split()))
List.append(0)
a = 0
i = 0
while a <= X and i <= N:
    a = a + List[i]
    i = i + 1
print(i)

Buggy python submission (verdict: Runtime Error):
N,X= map(int,input().split())
List=list(map(int,input().split()))
a = 0
i = 0
while a < X:
    a = a + List[i]
    i = i + 1
print(i)

Fixed submission:
N,X= map(int,input().split())
List=list(map(int,input().split()))
List.append(0)
a = 0
i = 0
while a <= X and i <= N:
    a = a + List[i]
    i = i + 1
print(i)

Buggy python submission (verdict: Runtime Error):
N,X= map(int,input().split())
List=list(map(int,input().split()))
a = 0
i = 0
while a < X:
    a = a + List[i]
    i = i + 1
print(i

Fixed submission:
N,X= map(int,input().split())
List=list(map(int,input().split()))
List.append(0)
a = 0
i = 0
while a <= X and i <= N:
    a = a + List[i]
    i = i + 1
print(i)
Buggy python submission (verdict: Runtime Error):
N = int(input())
List=[list(map(int,input().split())) for i in range(N)]
A = []
b =[]
for i in range(N):
    for j in range(i):
        if List[i][0] > List[j][0]:
            a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
        elif List[i][0] < List[j][0]:
            a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        else:
            if List[i][1] > List[j][1]:
                a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
            elif List[i][1] < List[j][1]:
                a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        b.append(A.count(a))
        A.append(a)
print(N-max(b)-1)

Fixed submission:
N = int(input())
List=[list(map(int,input().split())) for i in range(N)]
A = []
b =[]
for i in range(N):
    for j in range(i):
        if List[i][0] > List[j][0]:
            a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
        elif List[i][0] < List[j][0]:
            a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        else:
            if List[i][1] > List[j][1]:
                a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
            elif List[i][1] < List[j][1]:
                a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        b.append(A.count(a))
        A.append(a)
if b == []:
    print(1)
else:
    print(N-max(b)-1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
List=[list(map(int,input().split())) for i in range(N)]
A = []
b =[]
for i in range(N):
    for j in range(i):
        if List[i][0] > List[j][0]:
            a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
        elif List[i][0] < List[j][0]:
            a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        else:
            if List[i][1] > List[j][1]:
                a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
            elif List[i][1] < List[j][1]:
                a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        b.append(A.count(a))
        A.append(a)
print(N-max(b)-1)

Fixed submission:
N = int(input())
List=[list(map(int,input().split())) for i in range(N)]
A = []
b =[]
for i in range(N):
    for j in range(i):
        if List[i][0] > List[j][0]:
            a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
        elif List[i][0] < List[j][0]:
            a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        else:
            if List[i][1] > List[j][1]:
                a = [List[i][0]-List[j][0],List[i][1]-List[j][1]]
            elif List[i][1] < List[j][1]:
                a = [List[j][0]-List[i][0],List[j][1]-List[i][1]]
        b.append(A.count(a))
        A.append(a)
if b == []:
    print(1)
else:
    print(N-max(b)-1)
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
List=[input() for i in range(H)]
A =[[1]*(W) for i in range(H)]
B =[[1]*(H) for i in range(W)]
for i in range(H):
    k = 0
    a = 0
    while k < W:
        if List[i][k]==".":
            a += 1
            k = k+1
        else:
            for j in range(a):
                A[i][k-j-1]=a
            A[i][k]=a
            a = 0
            k = k+1
    for j in range(a):
                A[i][k-j-1]=a
for i in range(W):
    k = 0
    a = 0
    while k < H:
        if List[k][i]==".":
            a += 1
            k = k+1
        else:
            for j in range(a):
                B[i][k-j-1]=a
            B[i][k] = 0
            a = 0
            k = k+1
    for j in range(a):
                B[i][k-j-1]= a
max = 0
for i in range(H):
    for j in range(W):
        if max < A[i][j] + B[j][i]:
            max = A[i][j] + B[j][i]
print(max-1)
        


Fixed submission:
a,b,c=map(int,input().split())
s = max(a,b,c)
print(a+b+c-s)
Buggy python submission (verdict: Runtime Error):
A = int(input())
P = int(input())
K = 3 * A + P
print(K//2)

Fixed submission:
a,b=map(int,input().split())
print((a * 3 + b)//2)
Buggy python submission (verdict: Time Limit Exceeded):
import fractions
from functools import reduce
N = int(input())
A=[int(i) for i in input().split()]
B=[]
def list_gcd(a):
    l = len(a)
    if l ==1:
        return(a[0])
    elif l ==2:
        return(fractions.gcd(a[0],a[1]))
    else:
        k = l//2 
        return(fractions.gcd(list_gcd(a[:k]),list_gcd(a[k:])))
b = []
for i in range(N):
    if i>0 and i<N-1:
        a = A[:i]+A[i+1:]
    elif i == 0:
        a = A[1:]
    else:
        a = A[:N-1]
    b.append(list_gcd(a))
print(max(b))

Fixed submission:
import fractions
N = int(input())
A=[int(i) for i in input().split()]
B=[]
L = [0]
R = [0]
for i in range(N):
    L.append(fractions.gcd(A[i],L[i]))
    R.append(fractions.gcd(A[N-i-1],R[i]))
for i in range(N):
    B.append(fractions.gcd(L[i],R[N-i-1]))
print(max(B))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
from functools import reduce
import copy
N = int(input())
A=[int(i) for i in input().split()]
B=[]
def list_gcd(a):
    return reduce(fractions.gcd , a)
b = []
for i in range(N):
    if i>0 and i<N-1:
        a = A[:i]+A[i+1:]
    elif i == 0:
        a = A[1:]
    else:
        a = A[:N-1]
    b.append(list_gcd(a))
print(max(b))

Fixed submission:
import fractions
N = int(input())
A=[int(i) for i in input().split()]
B=[]
L = [0]
R = [0]
for i in range(N):
    L.append(fractions.gcd(A[i],L[i]))
    R.append(fractions.gcd(A[N-i-1],R[i]))
for i in range(N):
    B.append(fractions.gcd(L[i],R[N-i-1]))
print(max(B))

Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce
import copy
N = int(input())
A=[int(i) for i in input().split()]
B=[]
def list_gcd(a):
    return reduce(fractions.gcd , a)
b = []
for i in range(N):
    a = A[:i-1]+A[i+1:]
    b.append(list_gcd(a))
print(max(b))

Fixed submission:
import fractions
N = int(input())
A=[int(i) for i in input().split()]
B=[]
L = [0]
R = [0]
for i in range(N):
    L.append(fractions.gcd(A[i],L[i]))
    R.append(fractions.gcd(A[N-i-1],R[i]))
for i in range(N):
    B.append(fractions.gcd(L[i],R[N-i-1]))
print(max(B))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
from functools import reduce
import copy
N = int(input())
A=[int(i) for i in input().split()]
B=[]
def list_gcd(a):
    return reduce(fractions.gcd , a)
b = []
for i in range(N):
    a = copy.copy(A)
    a.remove(A[i])
    b.append(list_gcd(a))
print(max(b))

Fixed submission:
import fractions
N = int(input())
A=[int(i) for i in input().split()]
B=[]
L = [0]
R = [0]
for i in range(N):
    L.append(fractions.gcd(A[i],L[i]))
    R.append(fractions.gcd(A[N-i-1],R[i]))
for i in range(N):
    B.append(fractions.gcd(L[i],R[N-i-1]))
print(max(B))
Buggy python submission (verdict: Runtime Error):
n = input()
A = list(map(int, input().split()))
for i in range(n):
    if A[i]<0:
        A[i] = -A[i]
if n % 2 == 1:
    print(sum(A)-2*min(A))
else:
    print(sum(A))
            

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
count = 0
for i in range(n):
    if A[i]<0:
        A[i] = -A[i]
        count += 1
if count % 2 == 1:
    print(sum(A)-2*min(A))
else:
    print(sum(A))
Buggy python submission (verdict: Time Limit Exceeded):
x=input()
y=input()
m = 0 
for i in range(len(x)):
    if x[i] != y[i]:
        Y = y.replace(y[i], x[i]) 
        m+=1
print(m)      

Fixed submission:
x=input()
y=input()
m = 0 
for i in range(len(x)):
    if x[i] != y[i]: 
        m+=1
print(m)

Buggy python submission (verdict: Runtime Error):
x, y=input().split()
m = 0 
for i in range(len(x)):
    if x[i] != y[i]:
        Y = y.replace(y[i], x[i]) 
        m+=1
print(m)    

Fixed submission:
x=input()
y=input()
m = 0 
for i in range(len(x)):
    if x[i] != y[i]: 
        m+=1
print(m)
Buggy python submission (verdict: Runtime Error):
a=list(input().split())
a="".join(a)
count=0
for i in range(3):
    
    if a[i]=='R':
        count+=1
        ans=count
    else:
        count=0
       
        
print(ans)

Fixed submission:
n=input()
n="".join(n)
c,ans=0,0
for i in range(3):
    if n[i]=="R":
        c+=1
        ans=c
    else:
        c=0
        
print(ans)
Buggy python submission (verdict: Runtime Error):
h,w,k=map(int,input().split())
dot=[list(input()) for i in range(h)]
ans=0
for i in range(2**h):
    for j in range(2**w):
        
        count=0
        
        for ii in range(h):
            for jj in range(w):
                if(i >> ii)==0 & (j>>jj)==0:
                    if dot[i][j]=='#':
                        count+=1
    if count==k:
        ans+=1
print(ans)


Fixed submission:
h,w,k=map(int,input().split())
dot=[list(input()) for i in range(h)]
ans=0
for i in range(2**h):
    for j in range(2**w):
        
        count=0
        
        for ii in range(h):
            for jj in range(w):
                if(i >> ii)&1==0 and (j>>jj)&1==0:
                    if dot[ii][jj]=='#':
                        count+=1
        if count==k:
            ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
c=0
for i in range(0,x+1):
    if y>50:
        c+=1
        print("No")
        break
    if y==2*(x-i)+4*i:
        c+=1
        print("Yes")
        break
    elif y==2*x+4*(x-i):
        c+=1
        print("Yes")
        break
if c==0
    print("No")

Fixed submission:
x,y=map(int,input().split())
c=0
for i in range(0,x+1):
    if y==2*(x-i)+4*i:
        c+=1
        print("Yes")
        break
    elif y==2*i+4*(x-i):
        c+=1
        print("Yes")
        break
if c==0:
    print("No")

Buggy python submission (verdict: Runtime Error):
import sys
x,y=map(int,input().split())

for i in range(1,x+1):
  	if y>50: 
      print("No")
      break
    if y==2*(x-i)+4*i:
        print("Yes")
        break
    elif y==2*x+4*(x-i):
        print("Yes")
        break
    else:
        print("No")
        break


Fixed submission:
x,y=map(int,input().split())
c=0
for i in range(0,x+1):
    if y==2*(x-i)+4*i:
        c+=1
        print("Yes")
        break
    elif y==2*i+4*(x-i):
        c+=1
        print("Yes")
        break
if c==0:
    print("No")
Buggy python submission (verdict: Runtime Error):
#B failu
a=int(input())
b=list(map(int,input().split()))

if 0 in b:
  print(0)
  exit()
c=1
for i in b:
    c*=i
	if(c>10**18):
    	print(-1)
        exit()
     
print(c)


Fixed submission:
a=int(input())
b=list(map(int,input().split()))

if 0 in b:
  print(0)
  exit()
c=1
for i in b:
    c*=i
    if(c>10**18):
        print(-1)
        exit()
     
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=input()
b=b.split(" ")
b=[int(i) for i in b]
c=1
for i in b:
    c=c*i
if(c>10**18):
    print(-1)
else:
    print(c)
    

Fixed submission:
a=int(input())
b=list(map(int,input().split()))

if 0 in b:
  print(0)
  exit()
c=1
for i in b:
    c*=i
    if(c>10**18):
        print(-1)
        exit()
     
print(c)
Buggy python submission (verdict: Runtime Error):

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

color=[]
free=0
count=0
for i in a:
    if i//400<8 and i//400 not in color:
        color.append(i//400)
        Sans+=1
    elif i>=3200:
        free+=1
        
Mans=Sans
if free+count>8:
    Mans=8
else:
    Mans=count+free
    
print(Sans,Mans)


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

color=[]
free=0
Sans,Mans=0,0
for i in a:
    if i//400<8 and i//400 not in color:
        color.append(i//400)
        Sans+=1
    elif i>=3200:
        free+=1
        
#Mans=Sans
#if free+Sans>=8:
 #   Mans=8
#else:
 #   Mans=Sans+free

Mans=Sans+free
if Sans==0:
    Sans=1
print(Sans,Mans)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
ans=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    ans[a]+=b
    
for i in range(len(ba)):
    k-=ans[i]
    if k<=0:
        print(i)
        break

Fixed submission:
n,k=map(int,input().split())
ans=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    ans[a]+=b
    
v=0
for i in range(k):
    v+=ans[i]
    if ans[i]==0:
        i-=1
    if v>=k:
        a=i
        break
    
print(a)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
ans=[0]*10**5
for i in range(n):
    a,b=map(int,input().split())
    ans[a]+=b
    
v=0
for i in range(k):
    v+=ans[i]
    if ans[i]==0:
        i-=1
    if v>=k:
        a=i
        break
    
print(a)

Fixed submission:
n,k=map(int,input().split())
ans=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    ans[a]+=b
    
v=0
for i in range(k):
    v+=ans[i]
    if ans[i]==0:
        i-=1
    if v>=k:
        a=i
        break
    
print(a)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
count = 0
for k in range(a):
  if s[k] != t[k]:
    count += 1
    
print(count)

Fixed submission:
s = input()
t = input()
count = 0
for k in range(len(s)):
  if s[k] != t[k]:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
li = [int(i) for i in input().split()]
newlist = sorted(li)
price = 0
for a in range(k):
  count += newlist[a]
  
print(count)

Fixed submission:
n, k = map(int, input().split())
li = [int(i) for i in input().split()]
newlist = sorted(li)
price = 0
for a in range(k):
  price += newlist[a]
  
print(price)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
li = [int(i) for i in input().split()]
times = 1

for k in range (0, n):
  times = times * li[k]

if times > 10**18:
  print(-1)
else:
  print(times)

Fixed submission:
n = int(input())
li = [int(i) for i in input().split()]
times = 1

if 0 in li:
    times = 0
    print(0)
else:
    for k in range (0, n):
        times = times * li[k]
        if times > 10**18:
            print(-1)
            break
  
if times <= 10**18 and times != 0:
  print(times)
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal

a, b = input().split()
a = int(a)
b_100  = Decimal(b * 100)
print(int(a * b_100 // 100))

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
a, b =input().split()
a = int(a)
b_100 = round(100 * b)
times = a * b_100
new_times = times / 100
print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
import math
a, b = map(float, input().split())
times = 0
a = int(a)
b = round(math.float(100 * b))
times = a * b
new_times = times / 100
print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
import math


a, b = map(float, input().split())
times = 0
a = int(a)
b = int(math.floot(100 * b))
times = a * b
new_times = times / 100
print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
import math


a, b = map(float, input().split())
times = 0
a = int(a)
b = int(math.float(100 * b))
times = a * b
new_times = times / 100
print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Time Limit Exceeded):
import math

a, b = map(float, input().split())
times = 0
a = int(a)
if a == 0 or b == 0:
    print(0)
else:
    for k in range(0, a):
        times += b
    new_times = math.floor(times)
    print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
import math


a, b = map(float, input().split())
times = 0
if a == 0 or b == 0:
    print(0)
else:
    for k in range(0, a):
        times += b
    new_times = math.floor(times)
    print(new_times)

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))

Buggy python submission (verdict: Runtime Error):
import math

a, b = map(float, input().split())
c = int(a)
times = c * b
new_times = math.floar(times)
print(int(new_times))

Fixed submission:
a,b=input().split()
a=int(a)
b=float(b)*1000
b=int(b)
print(int((a*b)//1000))
Buggy python submission (verdict: Runtime Error):
n, m = map(int(), input().split())
if n == m:
  print('Yes')
else:
  print('No')

Fixed submission:
n, m = map(int, input().split())
if n == m:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
def function(X, K, D):
    kai = int(abs(X)/D)
    if kai >= K:
        if X > 0:
            ans = X-K*D
        else:
            ans = X+K*D
    else:
        K = K-kai
        if X > 0:
            X = X-kai*D
        else:
            X = X+kai*D
        if K % 2 == 1:
            if X > 0:
                ans = X-D
            else:
                ans = X+D
        else:
            ans = X
    return abs(ans)


if __name__ == '__main__':
    X, K, D = input().split()
    X = int(X)
    K = int(K)
    D = int(D)
    print(function(X, K, D))


Fixed submission:
def function(X):
    if X=='SRS':
        return 1
    elif X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        elif (X[0] == 'R') or (X[2] == 'R'):
            return 2
        else:
            return 0


if __name__ == '__main__':
    X = input()
    print(function(X))

Buggy python submission (verdict: Runtime Error):
def function(X):
    if X='SRS':
        return 1
    elif X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        elif (X[0] == 'R') or (X[2] == 'R'):
            return 2
        else:
            return 0


if __name__ == '__main__':
    X = input()
    print(function(X))


Fixed submission:
def function(X):
    if X=='SRS':
        return 1
    elif X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        elif (X[0] == 'R') or (X[2] == 'R'):
            return 2
        else:
            return 0


if __name__ == '__main__':
    X = input()
    print(function(X))
Buggy python submission (verdict: Runtime Error):
import numpy as np


def function(N, K, A):
    pre = [int(A[i]) for i in range(K)]
    for i in range(1, N-K+1):
        now = [int(A[i]) for i in range(i, K+i)]
        if np.prod(now) > np.prod(pre):
            print('Yes')
        else:
            print('No')
        pre = now


if __name__ == '__main__':
    numbers = input().split()
    N = int(numbers[0])
    K = int(numbers[1])
    A = input().split()
    function(N, K, A)


Fixed submission:
def function(N, K, A):
    for i in range(0, N-K):
        if A[K+i] > A[i]:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    numbers = input().split()
    N = int(numbers[0])
    K = int(numbers[1])
    A = input().split()
    A = [int(a) for a in A]
    function(N, K, A)