Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
sum=[0]*n
sum[0]=a[0]
for i in range(1,n):
        sum[i]=sum[i-1]*a[i]
        if i>=k:
            sum[i]/=a[i-k]
       
for i in range(k,n):
    if sum[i]>sum[i-1]:
        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):
import sys
n,k=map(int,input().split())
a=list(map(int,input().split()))
sum=[0]*n
sum[0]=a[0]

def input():
    return sys.stdin.readline()[:-1]

def main():
    
    for i in range(1,n):
        sum[i]=sum[i-1]*a[i]
        if i>=k:
            sum[i]/=a[i-k]
    
    # p=[0]*n
    # for i in range(k-1,n):
    #     if i==k-1:
    #         p[i]=sum[i]
    #     else:
    #         p[i]=sum[i]/sum[i-k]


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

    for i in range(k,n):
        if sum[i]>sum[i-1]:
            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):
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))

    sum=[0]*n
    sum[0]=a[0]
    for i in range(1,n):
        sum[i]=sum[i-1]*a[i]
        if i>=k:
            sum[i]/=a[i-k]
    
    # p=[0]*n
    # for i in range(k-1,n):
    #     if i==k-1:
    #         p[i]=sum[i]
    #     else:
    #         p[i]=sum[i]/sum[i-k]


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

    for i in range(k,n):
        if sum[i]>sum[i-1]:
            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):
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))

    sum=[0]*n
    sum[0]=a[0]
    for i in range(1,n):
        sum[i]=sum[i-1]*a[i]
    
    p=[0]*n
    for i in range(k-1,n):
        if i==k-1:
            p[i]=sum[i]
        else:
            p[i]=sum[i]/sum[i-k]


    for i in range(k,n):
        if p[i]>p[i-1]:
            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):
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))

    sum=[0]*n
    sum[0]=a[0]
    for i in range(1,n):
        sum[i]=sum[i-1]*a[i]
        p=[0]*n
    for i in range(k-1,n):
        if i==k-1:
            p[i]=sum[i]
        else:
            p[i]=sum[i]/sum[i-k]


    for i in range(k,n):
        if p[i]>p[i-1]:
            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()))

sum=[0]*n
sum[0]=a[0]
for i in range(1,n):
    sum[i]=sum[i-1]*a[i]
p=[0]*n
for i in range(k-1,n):
    if i==k-1:
        p[i]=sum[i]
    else:
        p[i]=sum[i]/sum[i-k]


for i in range(k,n):
    if p[i]>p[i-1]:
        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()))

sum=[0]*n
sum[0]=a[0]
for i in range(1,n):
    sum[i]=sum[i-1]*a[i]
p=[0]*n
for i in range(k-1,n):
    if i==k-1:
        p[i]=sum[i]
    else:
        p[i]=sum[i]/sum[i-k]


for i in range(k,n):
    if p[i]>p[i-1]:
        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')