Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

# cum = [1]*(N+1)
# for i in range(N):
#     cum[i+1] = cum[i]*A[i]
#     if K <= i:
#         cur = cum[i+1]//cum[i-K+1]
#         #print(i+1,cum[i],i-K,pre,cur)#
#         if pre < cur:
#             print("Yes")
#         else:
#             print("No")
#         pre = cur
#     else:
#         pre = cum[i+1]#

#print(cum)
# #https://qiita.com/keymoon/items/11fac5627672a6d6a9f6
# import sys
# T = sys.stdin.readline().rstrip()
# NT = len(T)
# P = sys.stdin.readline().rstrip()
# NP = len(P)
# if NT < NP:
#     exit()
# MOD = 2**61-1 #prime
# A = [ord(c) for c in T]
# pows = [1]*(NT+1)
# shash = [0]*(NT+1)
# for i in range(NT):
#     pows[i+1] = (pows[i]*126)%MOD
#     shash[i+1] = (shash[i]*126+A[i])%MOD
# ph = 0
# for i in range(NP):
#     ph = (ph*126+ord(P[i]))%MOD
# for i in range(len(T)-NP+1):
#     if ph == (shash[i+NP]-shash[i]*pows[NP])%MOD:
#         print(i)

pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
for i in range(K,N):
    #print(i)
    cur = (pre//A[i-K])*A[i]
    if pre < cur:
        print("Yes")
    else:
        print("No")
    pre = cur


Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

#pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
for i in range(K,N):
    #print(i)
    # cur = (pre//A[i-K])*A[i]
    if A[i-K] < A[i]:
        print("Yes")
    else:
        print("No")
    # if pre < cur:
    #
    # else:
    #     print("No")
    # pre = cur

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

cum = [1]*(N+1)
for i in range(N):
    cum[i+1] = cum[i]*A[i]
    if K <= i:
        cur = cum[i+1]//cum[i-K+1]
        #print(i+1,cum[i],i-K,pre,cur)#
        if pre < cur:
            print("Yes")
        else:
            print("No")
        pre = cur
    else:
        pre = cum[i+1]#

#print(cum)
# #https://qiita.com/keymoon/items/11fac5627672a6d6a9f6
# import sys
# T = sys.stdin.readline().rstrip()
# NT = len(T)
# P = sys.stdin.readline().rstrip()
# NP = len(P)
# if NT < NP:
#     exit()
# MOD = 2**61-1 #prime
# A = [ord(c) for c in T]
# pows = [1]*(NT+1)
# shash = [0]*(NT+1)
# for i in range(NT):
#     pows[i+1] = (pows[i]*126)%MOD
#     shash[i+1] = (shash[i]*126+A[i])%MOD
# ph = 0
# for i in range(NP):
#     ph = (ph*126+ord(P[i]))%MOD
# for i in range(len(T)-NP+1):
#     if ph == (shash[i+NP]-shash[i]*pows[NP])%MOD:
#         print(i)

# pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
# for i in range(K,N):
#     #print(i)
#     cur = (pre//A[i-K])*A[i]
#     if pre < cur:
#         print("Yes")
#     else:
#         print("No")
#     pre = cur


Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

#pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
for i in range(K,N):
    #print(i)
    # cur = (pre//A[i-K])*A[i]
    if A[i-K] < A[i]:
        print("Yes")
    else:
        print("No")
    # if pre < cur:
    #
    # else:
    #     print("No")
    # pre = cur

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])

for i in range(K,N):
    #print(i)
    cur = (pre//A[i-K])*A[i]
    if pre < cur:
        print("Yes")
    else:
        print("No")
    pre = cur


Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

#pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
for i in range(K,N):
    #print(i)
    # cur = (pre//A[i-K])*A[i]
    if A[i-K] < A[i]:
        print("Yes")
    else:
        print("No")
    # if pre < cur:
    #
    # else:
    #     print("No")
    # pre = cur