# m-solutions2020_c.py
# https://atcoder.jp/contests/m-solutions2020 : C

global FLAG_LOG
FLAG_LOG = False


def log(value):
    return
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    import math
    # K = lines[1]
    # K = int(lines[1])
    N, K = list(map(int, lines[0].split()))
    values = list(map(int, lines[1].split()))
    lvalues = [math.log(value) for value in values]
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    # marks = list()
    lmarks = list()

    for i in range(N-K+1):
        if i == 0:
            # targets = values[i:i+K]
            ltargets = lvalues[i:i+K]
            # log(f'targets=[{targets}]')
            log(f'ltargets=[{ltargets}]')
            # mark = 1
            lmark = 0
            # for target in targets:
            #     mark *= target
            # marks.append(mark)
            for ltarget in ltargets:
                lmark += ltarget
            lmarks.append(lmark)
        else:
            lmark = lmark - lvalues[i-1] + lvalues[i+K-1]
            lmarks.append(lmark)

    # rets = list()
    lrets = list()
    # prev = None
    lprev = None
    # for mark in marks:
    #     if prev is None:
    #         prev = mark
    #     else:
    #         if prev < mark:
    #             rets.append('Yes')
    #         else:
    #             rets.append('No')
    #         prev = mark
    for lmark in lmarks:
        if lprev is None:
            lprev = lmark
        else:
            if lprev < lmark:
                lrets.append('Yes')
            else:
                lrets.append('No')
            lprev = lmark

    return lrets


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5 3', '96 98 95 100 20']
        lines_export = ['Yes', 'No']
    if pattern == 2:
        lines_input = ['3 2', '1001 869120 1001']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['15 7', '3 1 4 1 5 9 2 6 5 3 5 8 9 7 9']
        lines_export = ['Yes', 'Yes', 'No', 'Yes', 'Yes', 'No', 'Yes', 'Yes']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()


Measured memory_bytes: 38888