Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
k,n  = map(int,input().split())
diff = lambda x:x[1]-x[0]
a = list(map(int,input().split()))
distance = a+[a[0]+k]
diffs = [diff(distance[i:i+2]) for i in range(len(distance)-1)]
diffs = diffs + [diffs[i] for i in range(0,n-2)]
sums = [sum(diffs[i:i+n-1]) for i in range(len(diffs)-(n-2))]
print(min(sums))

Fixed submission:
k,n  = map(int,input().split())
diff = lambda x:x[1]-x[0]
a = list(map(int,input().split()))
distance = a+[a[0]+k]
diffs = [diff(distance[i:i+2]) for i in range(len(distance)-1)]
print(k - max(diffs))

Buggy python submission (verdict: Time Limit Exceeded):
k,n  = map(int,input().split())
diff = lambda x:x[1]-x[0]
sum_list = lambda x:sum(x)
a = list(map(int,input().split()))
distance = a+[a[0]+k]
diffs = [diff(distance[i:i+2]) for i in range(len(distance)-1)]
diffs = diffs + [diffs[i] for i in range(0,n-2)]
sums = [sum_list(diffs[i:i+n-1]) for i in range(len(diffs)-(n-2))]
print(min(sums))


Fixed submission:
k,n  = map(int,input().split())
diff = lambda x:x[1]-x[0]
a = list(map(int,input().split()))
distance = a+[a[0]+k]
diffs = [diff(distance[i:i+2]) for i in range(len(distance)-1)]
print(k - max(diffs))
Buggy python submission (verdict: Runtime Error):
#coding:utf-8

import sys
import numpy as np

a = int(sys.argv[1])
b = int(sys.argv[2])

max_number = np.array([a+b,2*a-1,2*b-1]).max()
print(max_number)


Fixed submission:
import numpy as np
a,b= map(int,input().split())
max_number = np.array([a+b,2*a-1,2*b-1]).max()
print(max_number)
Buggy python submission (verdict: Runtime Error):
lpha=input()
cap=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
if(alpha in cap):
    print('A')
else:
    print('a')


Fixed submission:
a=input()
if(a.islower()):
    print('a')
else:
    print('A')
Buggy python submission (verdict: Runtime Error):
a=input()
sum=0
for i in a:
  if i=='R'
  sum=sum+1
print (sum)

Fixed submission:
a=input()
sum=0
if a[0]=='R':
    sum=1
    if a[0]==a[1]:
        sum=2
        if a[1]==a[2]:
            sum=3
else :
    if a[1]=='R':
        sum=1
        if a[2]==a[1]:
            sum =2
    elif a[2]=='R':
        sum=1
print (sum)

Buggy python submission (verdict: Runtime Error):
a=input()
b=[]
for i in f:
  b.append(i)
cons=0
for j in b:
  if j=='R':
    cons=cons+1
print cons

Fixed submission:
a=input()
sum=0
if a[0]=='R':
    sum=1
    if a[0]==a[1]:
        sum=2
        if a[1]==a[2]:
            sum=3
else :
    if a[1]=='R':
        sum=1
        if a[2]==a[1]:
            sum =2
    elif a[2]=='R':
        sum=1
print (sum)

Buggy python submission (verdict: Runtime Error):
S = input()
if S.contains("RRR"):
    print("3")
elif S.contains("RR"):
    print("2")
elif S.contains("R"):
    print("1")
else:
    print("0")

Fixed submission:
s = input().upper()
if s.count('RRR') == 1:
  print(3)
elif s.count('RR') == 1:
  print(2)
elif s.count('R') > 0:
  print(1)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
a = input()
print('A') if c.isupper() is True else print('a')

Fixed submission:
a = input()
print('A') if a.isupper() is True else print('a')

Buggy python submission (verdict: Runtime Error):
a = input()
print('A') if c.isupper() is True else print('B')

Fixed submission:
a = input()
print('A') if a.isupper() is True else print('a')
Buggy python submission (verdict: Runtime Error):
n = int(input())
k = int(input())
lst = []
result = []
for i in range(n):
    lst.append(int(input()))
for i in range(k):
    temp = min(lst)
    result.append(temp)
    lst.remove(temp)
print(sum(result))

Fixed submission:
n = list(int(num) for num in input().strip().split())
lst = list(int(num) for num in input().strip().split())[:n[0]]
result = []
for i in range(n[1]):
    temp = min(lst)
    result.append(temp)
    lst.remove(temp)
print(sum(result))

Buggy python submission (verdict: Runtime Error):
n, k = int(input()), int(input())
lst = []
result = []
for i in range(n):
    lst.append(int(input()))
for i in range(k):
    temp = min(lst)
    result.append(temp)
    lst.remove(temp)
print(sum(result))

Fixed submission:
n = list(int(num) for num in input().strip().split())
lst = list(int(num) for num in input().strip().split())[:n[0]]
result = []
for i in range(n[1]):
    temp = min(lst)
    result.append(temp)
    lst.remove(temp)
print(sum(result))
Buggy python submission (verdict: Runtime Error):
num=str(input())
temp=num
rev=0
while(num>0):
    dig=num%10
    rev=rev*10+dig
    num=num//10
if(temp==rev):
    print("Yes")
else:
    print("No")

Fixed submission:
n = input()
x = len(n)

if n == n[::-1]:
    if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:
        if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
def isPalindrome(str): 
 
    for i in xrange(0, len(str)/2):  
        if str[i] != str[len(str)-i-1]: 
            return False
    return True
  
s = input()
ans = isPalindrome(s) 
  
if (ans): 
    print("Yes") 
else: 
    print("No") 

Fixed submission:
n = input()
x = len(n)

if n == n[::-1]:
    if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:
        if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
x = int(input())

num = x // 3
rem = x % 3

if rem == 1:
    res = (num+1)*(num**2)

elif rem == 2:
    res = ((num + 1) ** 2) * num

else:
    res = num ** 3

res2 = (x/3)**3
if res > res2:
    print(res)
else:

Fixed submission:
x = int(input())

num = x // 3
rem = x % 3

if rem == 1:
    res = (num+1)*(num**2)

elif rem == 2:
    res = ((num + 1) ** 2) * num

else:
    res = num ** 3

res2 = (x/3)**3
if res > res2:
    print(res)
else:
    print(res2)
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N % 2 == 0:
    print(N//2)
else:
    print(N//2+1

Fixed submission:
N = int(input())

if N % 2 == 0:
    print(N//2)
else:
    print(N//2+1)
Buggy python submission (verdict: Runtime Error):
def toStr(n,base):
    convertString = "0123456789ABCDEF"
    if n < base:
        return convertString[n]
    else:
        return toStr(n//base,base) + convertString[n%base]

a,b = map(int,input().split())
print(len(toStr(a,b)))

Fixed submission:
N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)

Buggy python submission (verdict: Runtime Error):
def toStr(n,base):
    convertString = "0123456789ABCDEF"
    if n < base:
        return convertString[n]
    else:
        return toStr(n//base,base) + convertString[n%base]

a,b = map(int,input().split())
print(len(toStr(a,b)))

Fixed submission:
N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)

Buggy python submission (verdict: Runtime Error):
n= int(input())
r = int(input())
k = 0
if(n<10):
    k=100*(10-n)+r
    print(k)
else:
    print(r)

Fixed submission:
N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)

Buggy python submission (verdict: Runtime Error):
n= int(input())
r = int(input())
k = 0
if(n<10):
    k=100*(10-n)
    print(k)
else:
    print(r)

Fixed submission:
N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)

Buggy python submission (verdict: Runtime Error):
n, r = int(input())
k = 0
if(n<10):
    k=100*(10-n)
    print(k)
else:
    print(r)

Fixed submission:
N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)
Buggy python submission (verdict: Runtime Error):
a, b, c = int(intput())
if(a=b||a=c||b=c):
  return yes
elif(a=b=c):
  return no
else: 
  return no

Fixed submission:
numbers = map(int, input().split())
print("Yes") if len(set(numbers)) == 2 else print("No")
Buggy python submission (verdict: Runtime Error):
h, n = map(int, input().split())

m = [i for i in input().split()]

result = 0

for i in m:
    result += int(i)

if result >= h:
    print('Yes')
else:
    print('No')

Fixed submission:
h = int(input())

result = 0
i = 1
while h > 0:
    h = h // 2
    result = result + i
    i *= 2

print(result)

Buggy python submission (verdict: Runtime Error):
h, n = map(int, input().split())

m = [i for i in input().split()]

result = 0

for i in m:
    result += int(i)

if result >= h:
    print('Yes')
else:
    print('No')

Fixed submission:
h = int(input())

result = 0
i = 1
while h > 0:
    h = h // 2
    result = result + i
    i *= 2

print(result)
Buggy python submission (verdict: Runtime Error):
10
ZABCDBABCQ

Fixed submission:
K, X = [int(i) for i in input().split()]
print("Yes" if 500*K>=X else "No")

Buggy python submission (verdict: Runtime Error):
k=int(input())
x=int(input())
k=k*500
if k<x:
  print("Yes")
else:
  print("No")

Fixed submission:
K, X = [int(i) for i in input().split()]
print("Yes" if 500*K>=X else "No")

Buggy python submission (verdict: Runtime Error):
k = int(input())
x=int(input())
k=k*500
if k<x:
  print("Yes")
else:
  print("No")

Fixed submission:
K, X = [int(i) for i in input().split()]
print("Yes" if 500*K>=X else "No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = map(int,input().split())

sLength = set(L)
count = 0

for i in sLength:
    for j in sLength:
        for k in sLength:
            if i!=j and i!=k and j!=k:
                m = max([i,j,k])
                if i+j+k-2*m>0:
                    count+=1

print(count)


Fixed submission:
s = input()

table = {'RRR':3,'RRS':2,'RSR':1,'RSS':1,'SRS':1,'SRR':2,'SSS':0,'SSR':1}

for key,value in table.items():
    if key==s:
        print(value)
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = list(map(int,input().split()))
alice = 0
bob = 0

nums.sort()
while nums:
    alice+=nums.pop()
    bob+=nums.pop()

print(alice-bob)

Fixed submission:
n = int(input())
nums = list(map(int,input().split()))
alice = 0
bob = 0

nums.sort()
while nums:
    alice+=nums.pop()
    if nums:
        bob+=nums.pop()

print(alice-bob)
Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()
i = ""
if len(s) <= k:
  print(s)
  else: 
    for j in range(k):
      i = i + s[j]
    print(i + '...')

Fixed submission:
k = int(input())
s = input()
i = ""
if len(s) <= k:
    print(s)
else:
    for j in range(k):
        i = i + s[j]
    print(i+"...")
Buggy python submission (verdict: Runtime Error):
s, t = input().split(" ")
if t.__contains__(s):
    print("Yes")
else:
    print('No')

Fixed submission:
s = input()
t = input()
if s == t[:len(s)]:
    print("Yes")
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
sum = 0
if K>0:
    if A>0:
        if A>K:
            sum = sum + K
        else:
            sum = sum + A
    K = K - A
if K > 0:
    if B>0:
        K = K - B
if K > 0:
    if C>0:
        sum = sum + K * (-1)
print(sum)

Fixed submission:
a, b, c, k = map(int, input().split())
ans = 0
if k <= a:
    print(k)
else:
    k -= a
    ans += a
    if k <= b:
        print(ans)
    else:
        k -= b
        ans += -1 * k
        print(ans)

Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int,input().split())
sum = 0
if k > 0:
    if a > 0:
        if a > k:
            sum = sum + k
        else:
            sum = sum + a
    k = k - a
if k > 0:
    if b > 0:
        k = k - b
if k > 0:
    if c > 0:
        sum = sum + k (-1)
print(sum)

Fixed submission:
a, b, c, k = map(int, input().split())
ans = 0
if k <= a:
    print(k)
else:
    k -= a
    ans += a
    if k <= b:
        print(ans)
    else:
        k -= b
        ans += -1 * k
        print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = set()
for i in range(n):
    s.add(str(input()).lower())
print(len(x))



Fixed submission:
n = int(input())
s = set()
for i in range(n):
    s.add(str(input()).lower())
print(len(s))

Buggy python submission (verdict: Runtime Error):
i = int(input())
x = set()
for j in range(i):
    x.add(str(input().lower())
print(len(x))

Fixed submission:
n = int(input())
s = set()
for i in range(n):
    s.add(str(input()).lower())
print(len(s))
Buggy python submission (verdict: Runtime Error):
x = input()
y = input()
z = input()
temp = y
y = x
x = z
z = temp
print(x,y,z)

Fixed submission:
x,y,z = map(int, input().split())
temp = y
y = x
x = z
z = temp
print(x,y,z)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
if n % k ==0:
    print(0)
else:
    l = [n]
    p = n//k
    c = n-(p*k)
    half = k//2
    while c > half
        c = abs(c-k)
    l.append()
    print(min(l))

Fixed submission:
n,k = map(int,input().split())
if n % k ==0:
    print(0)
else:
    l = [n]
    p = n//k
    c = n-(p*k)
    half = k//2
    while c > half:
        c = abs(c-k)
    l.append(c)
    print(min(l))
Buggy python submission (verdict: Runtime Error):
print [S[:g]+S[g+1:]==(S[:g]+S[g+1:])[::-1] for g in range(len(S))].index(1)

Fixed submission:
s = input()
count = 0
first_half, second_half = s[:len(s)//2], s[(len(s)+1)//2:]
if first_half == reversed(second_half):
    print(count)
else:
    for x in range(len(first_half)):
        if first_half[x] != second_half[len(second_half)-x-1]:
            count += 1
    print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

if 0 in A:
    print(0)
    return 

Π = 1
for _ in A:
    Π *= _
    if(Π > 1000000000000000000):
        print(-1)
        return 

print(Π)

Fixed submission:
import sys

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

if 0 in A:
    print(0)
    sys.exit(0) 

Π = 1
for _ in A:
    Π *= _
    if(Π > 1000000000000000000):
        print(-1)
        sys.exit(0)

print(Π)
Buggy python submission (verdict: Runtime Error):
A, B, C, K = list(map(int, input().split()))

if( A + B >= K ):
    if(A >= K):
        print(K)
    else:
        print(A)
else:
    print(+1*A -1*(K-(A+B)))


Fixed submission:
S = input()
T = input()

flag = True

for i in range(len(S)):
    if(S[i] != T[i]):
        flag = False

if(flag):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd_list(num_list):
    return reduce(math.gcd, num_list)

K = int(input())

sum = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum += gcd_list([a, b, c])

print(sum)

Fixed submission:
import math
from functools import reduce

def gcd_list(num_list):
    return reduce(math.gcd, num_list)

K = int(input())

sum = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            sum += gcd_list([a, b, c])

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    K, N = list(map(int, input().split()))
    A = list(map(int, input().split()))

    # 距離の最大値を求める．
    max_dist = 0
    for i in range(N):
        for j in range(N):
            # 時計回りの距離
            dist1 = abs(A[i] - A[j])
            # 反時計回りの距離
            dist2 = K - dist1
            if(dist1 < dist2):
                dist_tmp = dist1
                flg = True
            else:
                dist_tmp = dist2
                flg = False
            if(dist_tmp > max_dist):
                max_dist = dist_tmp
                max_index = i, j
                max_flg = flg
    k = 0
    for k in range(N):
        if(k == max_index[0] or k == max_index[1]):
            continue
        if(abs(A[max_index[0]] - A[k] <= max_dist and  abs(A[max_index[1]] - A[k] <= max_dist))):
            if(flg):
                ans = max_dist
            else:
                ans = K - max_dist
        else:
            if(flg):
                ans = K - max_dist
            else:
                ans = max_dist
        break
    print(ans)


if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    K, N = list(map(int, input().split()))
    A = list(map(int, input().split()))
    A.sort()

    max_dist = 0
    for i in range(1, N):
        dist_tmp = A[i] - A[i-1]
        if(dist_tmp > max_dist):
            max_dist = dist_tmp
    dist_over_zero = K - (A[N-1] - A[0])
    if(dist_over_zero > max_dist):
        ans = K - dist_over_zero
    else:
        ans = K - max_dist
    print(ans)


if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Runtime Error):
N, A, B = list(map(int, input().split()))

blue_num = A * (N // (A + B)) + (N % (A + B) % A)
print(blue_num)

Fixed submission:
N, A, B = list(map(int, input().split()))

try:
    blue_num = A * (N // (A + B))
    residue = N - ((A + B) * (N // (A + B)))
    if(residue > A):
        blue_num += A
    else:
        blue_num += residue
except ZeroDivisionError:
    blue_num = 0

print(blue_num)

Buggy python submission (verdict: Runtime Error):
N, A, B = list(map(int, input().split()))

blue_num = A * (N // (A + B)) + (N % (A + B) % A)
print(blue_num)


Fixed submission:
N, A, B = list(map(int, input().split()))

try:
    blue_num = A * (N // (A + B))
    residue = N - ((A + B) * (N // (A + B)))
    if(residue > A):
        blue_num += A
    else:
        blue_num += residue
except ZeroDivisionError:
    blue_num = 0

print(blue_num)
Buggy python submission (verdict: Runtime Error):
def solve():
    N = int(input())
    S = input()
    count = 0

    for i in range(N):
        if(S[i] == "A" and S[i+1] == "B" and S[i+2] == "C"):
            count += 1

    print(count)


if __name__ == "__main__":
    solve()

Fixed submission:
def solve():
    N = int(input())
    S = input()
    count = 0

    for i in range(N-2):
        if(S[i] == "A" and S[i+1] == "B" and S[i+2] == "C"):
            count += 1

    print(count)


if __name__ == "__main__":
    solve()
Buggy python submission (verdict: Runtime Error):
s = list(input())

if(s[0] == s[1] == s[2] == "R"):
    ans = 3
elif(s[0] == s[1] == "R" or s[2] == s[1] == "R"):
    ans = 2
elif(s[0] == s[1] == s[2] == "S"):
    ans = 0
else:
    ans = 1

pritn(ans)


Fixed submission:
s = list(input())

if(s[0] == s[1] == s[2] == "R"):
    ans = 3
elif(s[0] == s[1] == "R" or s[2] == s[1] == "R"):
    ans = 2
elif(s[0] == s[1] == s[2] == "S"):
    ans = 0
else:
    ans = 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(input())


flag = 0
for i in range(n-1): 
    if(s[i] == "R" and s[i+1] == "W"):
        w_left = i
        r_right = i+1
        flag = 1
        break


#print(w_left)
#print(r_right)
if(flag == 1):
    w_len = len([i for i in s[r_right:] if i == "R"])
    r_len = len([i for i in s[:w_left] if i == "W"])
    print(max(w_len,r_len))
else:
    for i in range(n):
        if(s[i] == "W" and s[i+1] == "R"):
            flag = 2
            pnt = i
            if((pnt+1)*2 < n):
                print(pnt+1)
            else:
                print(n-pnt-1)

if(flag == 0):
    print(0)

Fixed submission:
n = int(input())
c = list(input())

def solve_fixed(p):
    w_cnt = 0
    r_cnt = 0

    for i in range(p):
        if(c[i] == "W"):
            w_cnt += 1
    
    for j in range(p,n):
        if(c[j] == "R"):
            r_cnt += 1
    
    return (w_cnt,r_cnt)

ans = 10**9
w_cnt,r_cnt = solve_fixed(0)

tmp = max(w_cnt,r_cnt)
ans = min(ans,tmp)
for i in range(n):
    
    if(c[i] == "W"):
        w_cnt += 1
    else:
        r_cnt -= 1

    tmp = max(w_cnt,r_cnt)
    ans = min(ans,tmp)
    

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n,k = map(int,input().split())

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

a_sum = [0 for _ in range(n+1)]
a_sum[0] = 1


a_sum[1:] = np.cumprod(a)
#print(a_sum)

score = [0 for _ in range(n-k+1)]

for i in range(k,n+1):
    score[i-k] = int(a_sum[i]/a_sum[i-k])

#print(score)

for i in range(1,n-k+1):
    if(score[i] > score[i-1]):
        print("Yes")
    else:
        print("No")



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

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

for i in range(k,n):
    if(a[i] > a[i-k]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
import numpy as np
n,k = map(int,input().split())

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

a_sum = [0 for _ in range(n+1)]
a_sum[0] = 1


a_sum[1:] = np.cumprod(a)
#print(a_sum)

score = [0 for _ in range(n-k+1)]

for i in range(k,n+1):
    score[i-k] = int(a_sum[i]/a_sum[i-k])

#print(score)

for i in range(1,n-k+1):
    if(score[i] > score[i-1]):
        print("Yes")
    else:
        print("No")


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

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

for i in range(k,n):
    if(a[i] > a[i-k]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

a_sum = [0 for _ in range(n+1)]
a_sum[0] = 1


for i in range(1,n+1):
    a_sum[i] = a_sum[i-1] * a[i-1]


score = [0 for _ in range(n-k+1)]

for i in range(k,n+1):
    score[i-k] = int(a_sum[i]/a_sum[i-k])

#print(score)

for i in range(1,n-k+1):
    if(score[i] > score[i-1]):
        print("Yes")
    else:
        print("No")

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

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

for i in range(k,n):
    if(a[i] > a[i-k]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

a_sum = [0 for _ in range(n+1)]
a_sum[0] = 1


for i in range(1,n+1):
    a_sum[i] = a_sum[i-1] * a[i-1]


score = [0 for _ in range(n-k+1)]

for i in range(k,n+1):
    score[i-k] = int(a_sum[i]/a_sum[i-k])

#print(score)

for i in range(1,n-k+1):
    if(score[i] > score[i-1]):
        print("Yes")
    else:
        print("No")

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

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

for i in range(k,n):
    if(a[i] > a[i-k]):
        print("Yes")
    else:
        print("No")