Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    cumprod = []

    for i in range(K, N):
        prev_score = 1
        curr_score = 1
        for j in range(i-K, i+1):
            if j == i-K:
                prev_score *= A[j]
            elif j == i:
                curr_score *= A[j]
            else:
                prev_score *= A[j]
                curr_score *= A[j]
        
        if prev_score < curr_score:
            print('Yes')
        else:
            print('No')

if __name__ == '__main__':
    main()

Fixed submission:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    tmp = 1

    for i in range(N):
        prev_tmp = tmp
        tmp *= A[i]

        if i > K - 1:
            tmp //= A[i-K]

            if tmp > prev_tmp:
                print('Yes')
            else:
                print('No')

if __name__ == '__main__':
    main()

Fixed submission:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    eval = []
    tmp = 1

    for i in range(N):
        tmp *= A[i]

        if i >= K - 1:
            eval.append(tmp)
            tmp //= A[i-(K-1)]
    
    for i in range(1, len(eval)):
        if eval[i] > eval[i-1]:
            print('Yes')
        else:
            print("No")

if __name__ == '__main__':
    main()

Fixed submission:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

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

if __name__ == '__main__':
    main()