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

def main():
    scores = []
    score = 1
    for i in range(k-1, -1, -1):
        score *= a[i]

    scores.append(score)
    scores_append = scores.append

    for j in range(k, n):
        score_before = scores[-1]
        score = score_before * a[j] / a[j-k]
        scores_append(score)
        if score > score_before:
            print('Yes')
        else:
            print('No')

            
if __name__ == '__main__':
    main()    

Fixed submission:
n, k= map(int, input().split())
a = list(map(int, 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 = list(map(int, input().split()))

def main():
    scores = []
    score = 1
    for i in range(k-1, -1, -1):
        score *= a[i]

    scores.append(score)
    scores_append = scores.append

    for j in range(k, n):
        scores_append(scores[-1] * a[j] / a[j-k])
        if scores[-1] > scores[-2]:
            print('Yes')
        else:
            print('No')

            
if __name__ == '__main__':
    main()

Fixed submission:
n, k= map(int, input().split())
a = list(map(int, 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 = list(map(int, input().split()))

def main():
    scores = []
    score = 1
    for i in range(k-1, -1, -1):
        score *= a[i]

    scores.append(score)

    for j in range(k, n):
        scores.append(scores[-1] * a[j] / a[j-k])
        if scores[-1] > scores[-2]:
            print('Yes')
        else:
            print('No')

            
if __name__ == '__main__':
    main()

Fixed submission:
n, k= map(int, input().split())
a = list(map(int, 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 = list(map(int, input().split()))

scores = []

score = 1
for i in range(k-1, -1, -1):
    score *= a[i]

scores.append(score)

for j in range(k, n):
    scores.append(scores[-1] * a[j] / a[j-k])
    if scores[-1] > scores[-2]:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k= map(int, input().split())
a = list(map(int, 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 = list(map(int, input().split()))

scores = []

score = 1
for i in range(k-1, -1, -1):
    score *= a[i]

scores.append(score)

for j in range(k, n):
    scores.append(scores[-1] * a[j] / a[j-k])
    if scores[-1] > scores[-2]:
        print('Yes')
    else:
        print('No')



Fixed submission:
n, k= map(int, input().split())
a = list(map(int, 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 = list(map(int, input().split()))

scores = []

for i in range(k, n+1):
    score = 1
    for j in range(i-1, i-k-1, -1):
        score *= a[j]
    scores.append(score)
    if len(scores) > 1:
        if scores[-1] > scores[-2]:
            print('Yes')
        else:
            print('No')



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

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