Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * (N+1)
cnt = 0

for k in range(K, N+1):
    A_sum = A[cnt]
    for i in range(cnt, K+cnt-1):
        if A[i+1] == 0:
            A_sum = 0
            break
        else:
            A_sum = A_sum * A[i+1]
    i_list[k] = A_sum
    A_sum = 0
    cnt = cnt + 1

for k in range(K, N):
    if i_list[k] < i_list[k+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

for i in range(K, N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

A_sum = A[0]
for i in range(K-1):
    if A[i+1] == 0:
        A_sum = 0
        break
    else:
        A_sum = A_sum * A[i+1]
i_list[K-1] = A_sum
cnt = 0

for k in range(K, N):
    i_list[k] = i_list[k-1] // A[cnt] * A[k]
    cnt = cnt + 1
    if i_list[k-1] < i_list[k]:
        print('Yes')
    else:
        print('No')


Fixed submission:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

for i in range(K, N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

A_sum = A[0]
for i in range(K-1):
    if A[i+1] == 0:
        A_sum = 0
        break
    else:
        A_sum = A_sum * A[i+1]
i_list[K-1] = A_sum
cnt = 0

for k in range(K, N):
    i_list[k] = i_list[k-1] // A[cnt] * A[k]
    cnt = cnt + 1

for k in range(K-1, N-1):
    if i_list[k] < i_list[k+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

for i in range(K, N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

A_sum = A[0]
for i in range(K-1):
    A_sum = A_sum * A[i+1]
i_list[K-1] = A_sum
cnt = 0

for k in range(K, N):
    i_list[k] = i_list[k-1] // A[cnt] * A[k]
    cnt = cnt + 1

for k in range(K-1, N-1):
    if i_list[k] < i_list[k+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

for i in range(K, N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * (N+1)
cnt = 0

for k in range(K, N+1):
    A_sum = A[cnt]
    for i in range(cnt, K+cnt-1):
        A_sum = A_sum * A[i+1]
    i_list[k] = A_sum
    A_sum = 0
    cnt = cnt + 1

for k in range(K, N):
    if i_list[k] < i_list[k+1]:
        print('Yes')
    else:
        print('No')

Fixed submission:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

for i in range(K, N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')