Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.append(A)
    if i >= K:
        if l.pop(0) < A:
            print("Yes")
        else:
            print("No")
    i = i + 1


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i >= K:
        if l.pop(0) < A:
            print("Yes")
        else:
            print("No")
    i = i + 1


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i >= K:
        if l.pop(0) < A:
            print("Yes")
        else:
            print("No")
    i = i + 1


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
l = []
Ap = 1
An = 1
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i < K:
        Ap = Ap * A
    else:
        An = Ap / l.pop(0) * A
        if An > Ap:
            print("Yes")
        else:
            print("No")
        Ap = An
    i = i + 1


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
l = []
Ap = 0
An = 0
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i < K:
        Ap = Ap + A
    else:
        An = Ap - l.pop(0) + A
        if An > Ap:
            print("Yes")
        else:
            print("No")
        Ap = An
    i = i + 1


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
l = []
Ap = 0
An = 0
As = list(map(int, input().split()))
for i in range(N):
    A = As[i]
    l.append(A)
    if i < K:
        Ap = Ap + A
    else:
        An = Ap - l.pop(0) + A
        if An > Ap:
            print("Yes")
        else:
            print("No")
        Ap = An


Fixed submission:
N, K = map(int, input().split())
l = []
i = 0
for x in input().split():
    A = int(x)
    if K < N - i:
        l.insert(0, A)
    if i >= K:
        if l.pop() < A:
            print("Yes")
        else:
            print("No")
    i = i + 1