Buggy python submission (verdict: Time Limit Exceeded):
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = []
    res = 1
    for i in range(n):
        x = res
        if i<k:
            res *= a[i]
        else:
            res //= a[i-k]
            res *= a[i]
            if res>x:
                ans.append("Yes\n")
            else:
                ans.append("No\n")
    print(''.join(ans))
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = ["Yes\n" for i in range(n-k)]
    for i in range(n):
        if i<k:
            continue
        if a[i]>a[i-k]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = []
    res = 1
    for i in range(n):
        x = res
        if i<k:
            res *= a[i]
        else:
            res //= a[i-k]
            res *= a[i]
            if res>x:
                ans.append("Yes\n")
            else:
                ans.append("No\n")
    print(''.join(ans))
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = ["Yes\n" for i in range(n-k)]
    for i in range(n):
        if i<k:
            continue
        if a[i]>a[i-k]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = []
    res = 1
    for i in range(n):
        x = res
        if i<k:
            res *= a[i]
        else:
            res //= a[i-k]
            res *= a[i]
            if res>x:
                ans.append("Yes")
            else:
                ans.append("No")
    print("\n".join(ans))
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = ["Yes\n" for i in range(n-k)]
    for i in range(n):
        if i<k:
            continue
        if a[i]>a[i-k]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    val = []
    res = 1
    for i in range(n):
        if i<k-1:
            res *= a[i]
        elif i==k-1:
            res *= a[i]
            val.append(res)
        else:
            res //= a[i-k]
            res *= a[i]
            val.append(res)
    for i in range(1,len(val)):
        if val[i-1]<val[i]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = ["Yes\n" for i in range(n-k)]
    for i in range(n):
        if i<k:
            continue
        if a[i]>a[i-k]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()