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

L = N-K+1
prev = sum(A[:K])
for i in range(1, L):
    score = sum(A[i:i+K])
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


L = N-K+1
prev = ACC[K] - ACC[0]
for i in range(1, L):
    score = ACC[i+K] - ACC[i] 
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score

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 product, combinations, permutations
from copy import deepcopy
import sys
sys.setrecursionlimit(4100000)
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


if __name__ == '__main__':
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    mod = len(A)%K
    prev = None
    L = 0

    for i in range(N-K+1):
        check = A[i:i+K]
        if i==0:
            acc = 1
            for c in check:
                acc *= c
                prev = acc
        else:
            acc = 1
            for c in check:
                acc *= c
            if prev<acc:
                print("Yes")
            else:
                print("No")
            prev = acc

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


L = N-K+1
prev = ACC[K] - ACC[0]
for i in range(1, L):
    score = ACC[i+K] - ACC[i] 
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score

Buggy python submission (verdict: Runtime Error):
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 product, combinations, permutations
from copy import deepcopy
import sys
import numpy as np
sys.setrecursionlimit(4100000)
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


if __name__ == '__main__':
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    mod = len(A)%K
    prev = None
    L = 0

    for i in range(N-K+1):
        check = A[i:i+K]
        if i==0:
            acc = 1
            for c in check:
                acc *= c
                prev = acc
        else:
            acc = 1
            for c in check:
                acc *= c
            if prev<acc:
                print("Yes")
            else:
                print("No")
            prev = acc

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


L = N-K+1
prev = ACC[K] - ACC[0]
for i in range(1, L):
    score = ACC[i+K] - ACC[i] 
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score

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 product, combinations, permutations
from copy import deepcopy
import sys
import numpy as np
sys.setrecursionlimit(4100000)
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


if __name__ == '__main__':
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    mod = len(A)%K
    prev = None
    L = 0

    for i in range(N-K+1):
        check = A[i:i+K]
        if i==0:
            acc = 1
            for c in check:
                acc *= c
                prev = acc
        else:
            acc = 1
            for c in check:
                acc *= c
            if prev<acc:
                print("Yes")
            else:
                print("No")
            prev = acc

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


L = N-K+1
prev = ACC[K] - ACC[0]
for i in range(1, L):
    score = ACC[i+K] - ACC[i] 
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score