Buggy python submission (verdict: Time Limit Exceeded):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, k = LI()
a = LI()
base = 1
for elem in a[:k]:
    base *= elem
for i in range(k, n):
    rate = a[i] / a[i-k]
    # print(rate)
    if rate > 1:
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)


Fixed submission:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, k = LI()
a = LI()
base = 1
for i in range(k, n):
    rate = a[i] / a[i-k]
    if rate > 1:
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, k = LI()
a = LI()
base = 1
for elem in a[:k]:
    base *= elem
for i in range(k, n):
    now = (base//a[i - k]) * a[i]
    if base < now:
        ans = 'Yes'
    else:
        ans = 'No'
    base = now
    print(ans)


Fixed submission:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, k = LI()
a = LI()
base = 1
for i in range(k, n):
    rate = a[i] / a[i-k]
    if rate > 1:
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


def is_ok(n, k, a):
    res = []
    # O(n - k)
    for i in range(k - 1, n):
        mul = 1
        # O(k)
        for j in range(i - k+1, i + 1):
            mul *= a[j]
        res.append(mul)
    return res


n, k = LI()
a = LI()
base = 1
for elem in a[:k]:
    base *= elem
# print(base)
for i in range(k, n):
    # print(f'{i=}')
    # print(f'{i-k=}, {a[i-k]=}')
    # print(base, (base//a[i - k]) * a[i])
    if base < (base//a[i - k]) * a[i]:
        ans = 'Yes'
    else:
        ans = 'No'
    base = (base//a[i - k]) * a[i]
    print(ans)


Fixed submission:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, k = LI()
a = LI()
base = 1
for i in range(k, n):
    rate = a[i] / a[i-k]
    if rate > 1:
        ans = 'Yes'
    else:
        ans = 'No'
    print(ans)