Problem:
Score: 300 points

Problem Statement

M-kun is a student in Aoki High School, where a year is divided into N terms.

There is an exam at the end of each term. According to the scores in those exams, a student is given a grade for each term, as follows:

For the first through (K-1)-th terms: not given.

For each of the K-th through N-th terms: the multiplication of the scores in the last K exams, including the exam in the graded term.

M-kun scored A_i in the exam at the end of the i-th term.

For each i such that K+1 \leq i \leq N, determine whether his grade for the i-th term is strictly greater than the grade for the (i-1)-th term.

Constraints

2 \leq N \leq 200000

1 \leq K \leq N-1

1 \leq A_i \leq 10^{9}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N K
A_1 A_2 A_3 \ldots A_N

Output

Print the answer in N-K lines.

The i-th line should contain Yes if the grade for the (K+i)-th term is greater than the grade for the (K+i-1)-th term, and No otherwise.

Sample Input 1

5 3
96 98 95 100 20

Sample Output 1

Yes
No

His grade for each term is computed as follows:

3-rd term: (96 \times 98 \times 95) = 893760

4-th term: (98 \times 95 \times 100) = 931000

5-th term: (95 \times 100 \times 20) = 190000

Sample Input 2

3 2
1001 869120 1001

Sample Output 2

No

Note that the output should be No if the grade for the 3-rd term is equal to the grade for the 2-nd term.

Sample Input 3

15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9

Sample Output 3

Yes
Yes
No
Yes
Yes
No
Yes
Yes

Solution in Rust (1.42.0) (judge verdict: Wrong Answer)

#![allow(unused_macros, unused_variables, dead_code, clippy::many_single_char_names)]
use std::io::{stdin, stdout, StdinLock, StdoutLock, BufWriter, prelude::*};

macro_rules! read {
    ($s: ident) => {
        {
            $s.read()
        }
    };
    ($s: ident, $t: ty) => {
        {
            let mut v: $t = 0;
            let num = $s.read();
            let l = num.len();
            
            if num[0] == b'-' {
                for d in &num[1..l] {
                    v = v*10 - (*d as $t) + (b'0' as $t);
                }
            } else {
                for d in &num[..l] {
                    v = v*10 + (*d as $t) - (b'0' as $t);
                }
            }
            v
        }
    }
}

macro_rules! to_str {
    ($v: expr) => {
        {
            let mut s = String::new();
            for x in $v {
                s.push(*x as char);
            }
            s
        }
    };
    ($v: expr, $l: expr) => {
        {
            let mut s = String::with_capacity($l);
            for x in $v {
                s.push(*x as char);
            }
            s
        }
    }
}

macro_rules! to_vec {
    ($v: expr) => {
        {
            let mut s = Vec::new();
            for x in $v {
                s.push(*x as char);
            }
            s
        }
    };
    ($v: expr, $l: expr) => {
        {
            let mut s = Vec::with_capacity($l);
            for x in $v {
                s.push(*x as char);
            }
            s
        }
    }
}

macro_rules! read_vec {
    ($s: ident, $l: expr) => {
        {
            let mut v = Vec::with_capacity($l);
            for _ in 0..$l {
                v.push(to_str!(read!($s)));
            }
            v
        }
    };
    ($s: ident, $t: ty, $l: expr) => { // for ints
        {
            let mut v = Vec::with_capacity($l);
            for _ in 0..$l {
                v.push(read!($s, $t));
            }
            v
        }
    };
}

macro_rules! void {
    ($s: ident, $l: expr) => {
        if $l > 0 {
            let mut n = 0;
            let mut first = true;

            while n < $l {
                if $s.pos != 0 {
                    $s.stdin.consume($s.pos);
                }

                let buf = $s.stdin.fill_buf().unwrap();

                let mut resume = true;

                for (i, x) in buf.iter().enumerate() {
                    if x == &b' ' || x == &b'\n' {
                        if i == 0 && first {
                            continue;
                        }

                        n += 1;

                        if n == $l {
                            $s.pos = i+1;
                            resume = false;
                            break;
                        }
                    }
                }

                if resume {
                    $s.pos = buf.len();
                    first = false;
                }
            }
        }
    };
}

macro_rules! pipe {
    // ($s: ident, $($x: ident),*) => {
    //     $(
    //         $x = read!($s);
    //     )*
    // };
    ($s: ident, $t: ty, $($x: ident),*) => {
        $(
            $x = read!($s, $t);
        )*
    };
    ($s: ident, $( ($x: ident, $t: ty) ),*) => {
        $(
            $x = read!($s, $t);
        )*
    };
}

struct Reader<'a> {
    stdin: StdinLock<'a>,
    pos: usize,
    v_temp: Vec<u8>
}

impl<'a> Reader<'a> {
    fn new(stdin: StdinLock<'a>)/*'*/ -> Self {
        Reader {stdin, pos: 0, v_temp: vec![]}
    }
    
    fn read(&mut self) -> &[u8] {
        if self.pos != 0 {
            self.stdin.consume(self.pos);
        }
        let mut s = 0;
        let mut i = 0;
        
        let buf = self.stdin.fill_buf().unwrap();
        
        loop {
            if unsafe {buf.get_unchecked(i)} < &33 {
                if i > buf.len() {
                    let b_len = buf.len();
                    let mut idx_char = 0;
                    
                    loop {
                        if unsafe {buf.get_unchecked(idx_char)} > &33 || idx_char == b_len {
                            break;
                        }
                        idx_char += 1;
                    }
                    let mut v1;
                    if b_len != idx_char {
                        v1 = vec![0; b_len-idx_char];
                        v1[..].copy_from_slice(&buf[idx_char..]);
                    } else {
                        v1 = vec![];
                    }

                    let new_buf = {
                        self.stdin.consume(b_len);
                        let buf = self.stdin.fill_buf().unwrap();
                        let mut i = 0;

                        loop {
                            if unsafe {buf.get_unchecked(i)} < &33 {
                                break if i == 0 {
                                    &[]
                                } else {
                                    &buf[..=i]
                                }
                            }
                            i += 1;
                        }
                    };
                    if !new_buf.is_empty() {
                        self.pos = new_buf.len();
                        v1.extend(new_buf.iter());
                    } else {
                        self.pos = 0;
                    }

                    self.v_temp = v1;

                    return &self.v_temp[..];
                } else if s == i {
                    s += 1;
                } else {
                    break;
                }
            }
            i += 1;
        }
        self.pos = i+1;

        if s == i {
            self.read()
        } else {
            &self.stdin.fill_buf().unwrap()[s..i]
        }
    }
}

fn main() {
    let stdin = stdin();
    let stdout = stdout();
    solve(&mut Reader::new(stdin.lock()), &mut BufWriter::new(stdout.lock()));
}

fn solve(r: &mut Reader, w: &mut BufWriter<StdoutLock>) {
    let (n, k);
    pipe!(r, usize, n, k);

    let mut a = Vec::with_capacity(n);
    let mut min = 10e9 as u128;

    for _ in 0..n {
        let x = read!(r, u128);
        a.push(x);

        if min > x {
            min = x;
        }
    }
    min = min-1;
    
    if min > 0 {
        for x in a.iter_mut() {
            *x -= min;
        }
    }

    let mut prev = 0;
    for (i, x) in a.windows(k).enumerate() {
        let mut val = 1;
        if i == 0 {
            for xi in &x[..] {
                val *= *xi;
            }
        } else {
            val = prev/a[i-1]*x[x.len()-1];
        }

        if prev == 0 {}
        else if val > prev {
            writeln!(w, "Yes").unwrap();
        } else {
            writeln!(w, "No").unwrap();
        }
        prev = val;
    }
}